Skip to content

Commit 32371dd

Browse files
committed
test: write empty credentials for windows tests for io speed
1 parent b48e5cf commit 32371dd

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

cli/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ runs:
133133
Write-Output "DEBUG: Contents of ${slackDir}:"
134134
if (Test-Path $slackDir) { Get-ChildItem $slackDir } else { Write-Output " Directory not found!" }
135135
136+
# Pre-create credentials file to avoid write/read race
137+
$slackConfigDir = "$env:USERPROFILE\.slack"
138+
if (-not (Test-Path $slackConfigDir)) { New-Item -ItemType Directory -Path $slackConfigDir -Force | Out-Null }
139+
$credsPath = "$slackConfigDir\credentials.json"
140+
if (-not (Test-Path $credsPath)) {
141+
Set-Content -Path $credsPath -Value "{}`n"
142+
Write-Output "DEBUG: Pre-created empty credentials.json"
143+
} else {
144+
Write-Output "DEBUG: credentials.json already exists"
145+
}
146+
136147
$args = "$env:SLACK_COMMAND --skip-update"
137148
if ($env:SLACK_TOKEN) {
138149
$args = "$args --token $env:SLACK_TOKEN"

0 commit comments

Comments
 (0)