Skip to content

fix(gitagent.sh): replace node-shebang symlink with bun wrapper#247

Merged
sebst merged 2 commits intomainfrom
copilot/fix-gitagent-wrapper-and-test
Mar 30, 2026
Merged

fix(gitagent.sh): replace node-shebang symlink with bun wrapper#247
sebst merged 2 commits intomainfrom
copilot/fix-gitagent-wrapper-and-test

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

bun install -g creates a symlink to a .js file with a #!/usr/bin/env node shebang, causing /usr/bin/env node: no such file or directory at runtime since node is not present in the container.

Changes

  • src/gitagent.sh/install.sh: After install, resolve the symlink, remove it, and write a bun run shell wrapper in its place — identical pattern to src/dotenv.org/install.sh:
    local gitagentJs
    gitagentJs=$(readlink -f "${binaryTargetFolder}/${binaryName}")
    rm "${binaryTargetFolder}/${binaryName}"
    printf '#!/bin/sh\nexec bun run "%s" "$@"\n' "${gitagentJs}" > "${binaryTargetFolder}/${binaryName}"
    chmod +x "${binaryTargetFolder}/${binaryName}"
  • test/gitagent.sh/test.sh: Add gitagent --version check to exercise the binary at test time, not just assert file existence.
  • src/gitagent.sh/devcontainer-feature.json + README.md: Bump version 1.0.01.0.1.

Copilot AI linked an issue Mar 30, 2026 that may be closed by this pull request
@sebst sebst marked this pull request as ready for review March 30, 2026 11:49
Copilot AI changed the title [WIP] Fix feature gitagent.SH for bun compatibility fix(gitagent.sh): replace node-shebang symlink with bun wrapper Mar 30, 2026
Copilot AI requested a review from sebst March 30, 2026 11:51
@sebst sebst merged commit 52ccaf1 into main Mar 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature "gitagent.SH": /use/bin/env node: no such file or directory

2 participants