Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 9, 2026

Fixes the build issues introduced after the Sentry integration PR:

Changes

  1. Add shebang to built binary - The esbuild output was missing #!/usr/bin/env node, causing the shell to execute the JavaScript file as a shell script. The build script now adds the shebang if not already present.

  2. Fix environment expression for PR builds - Changed environment: ${{ github.ref == 'refs/heads/master' && 'production' || '' }} to environment: ${{ github.ref == 'refs/heads/master' && 'production' }}. The empty string fallback was causing the Artifacts Upload job to be skipped on PRs.

  3. Clean up inject file - Removed leading blank line from src/utils/import-meta-url.js.

Fixes

  • ./dist/craft: Permission denied - Fixed by adding chmod
  • ./dist/craft: line 1: var: command not found - Fixed by adding shebang
  • Artifacts Upload job not running on PRs - Fixed by removing || '' from environment expression

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@BYK BYK changed the title fix: add shebang to built craft binary fix: add shebang to binary and fix PR CI environment Jan 9, 2026
@BYK BYK merged commit f195b9c into master Jan 9, 2026
19 checks passed
@BYK BYK deleted the fix/add-shebang branch January 9, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants