Skip to content

Commit 3f2b050

Browse files
committed
fix(ci): prevent diagnostic checks from stopping script execution
The diagnostic logging added in 77c7900 was causing all CI jobs to fail immediately after the build step. The issue was operator precedence with the || operator causing script termination when diagnostic checks failed. Root cause: ls -la dist/ 2>/dev/null || dir dist\ When dist/ doesn't exist: - ls returns exit 2 - || triggers dir command - dir also returns exit 2 - Entire script stops, tests never run Fix: Wrap diagnostic commands in subshells with || true: (ls -la dist/ 2>/dev/null || dir dist\ || true) This ensures diagnostic failures don't stop script execution while still providing the logging we need to debug the Windows build issues.
1 parent c881538 commit 3f2b050

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
name: Run CI Pipeline
4141
uses: SocketDev/socket-registry/.github/workflows/ci.yml@d8ff3b0581d799466cfbf150f715c1a4bf9f84a5 # 2025-10-23
4242
with:
43-
test-setup-script: 'echo "=== Build Setup Debug ===" && pwd && echo "Before build:" && ls -la packages/cli/ 2>/dev/null || dir packages\\cli\\ && pnpm --filter @socketsecurity/cli run build && echo "After build:" && ls -la packages/cli/dist/ 2>/dev/null || dir packages\\cli\\dist\\ && echo "Checking cli.js:" && ls -la packages/cli/dist/cli.js 2>/dev/null || dir packages\\cli\\dist\\cli.js && echo "=== Build Setup Complete ==="'
43+
test-setup-script: 'echo "=== Build Setup Debug ===" && pwd && echo "Before build:" && (ls -la packages/cli/ 2>/dev/null || dir packages\\cli\\ || true) && pnpm --filter @socketsecurity/cli run build && echo "After build:" && (ls -la packages/cli/dist/ 2>/dev/null || dir packages\\cli\\dist\\ || true) && echo "Checking cli.js:" && (ls -la packages/cli/dist/cli.js 2>/dev/null || dir packages\\cli\\dist\\cli.js || true) && echo "=== Build Setup Complete ==="'
4444
lint-script: 'pnpm --filter @socketsecurity/cli run check'
4545
type-check-script: 'pnpm --filter @socketsecurity/cli run type'
4646
test-script: ${{ inputs.skip-tests && 'echo "Tests skipped"' || 'pnpm --filter @socketsecurity/cli run test:unit' }}

0 commit comments

Comments
 (0)