File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments