Skip to content

Commit af65dd3

Browse files
backspace135claude
andcommitted
fix: check payload-dumper-go's exec bit without /usr/bin/test
The macOS packaging job died with "/usr/bin/test is not recognized". `test` lives at /bin/test on macOS; /usr/bin/test is a Linux path. Only the App osx-arm64 job reached this branch, so it was the only one to fail. Uses System.IO.File.GetUnixFileMode instead of shelling out, which needs no external binary and no assumption about its path. Reproduced the failure and verified the fix locally under pwsh on macOS, including stripping the exec bit to confirm the check still rejects a non-executable payload-dumper-go. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a201bfa commit af65dd3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ jobs:
255255
}
256256
257257
$payloadPath = Join-Path $extractDir "${appPrefix}root-tools/payload-dumper/$payloadExecutable"
258-
& /usr/bin/test -x $payloadPath
259-
if ($LASTEXITCODE -ne 0) {
260-
throw "macOS payload-dumper-go is not executable in '$($zip.Name)'."
258+
$mode = [System.IO.File]::GetUnixFileMode($payloadPath)
259+
if (-not ($mode -band [System.IO.UnixFileMode]::UserExecute)) {
260+
throw "macOS payload-dumper-go is not executable in '$($zip.Name)' (mode: $mode)."
261261
}
262262
}
263263

0 commit comments

Comments
 (0)