Skip to content

Commit 52ccaf1

Browse files
authored
fix(gitagent.sh): replace node-shebang symlink with bun wrapper (#247)
1 parent b82e8c0 commit 52ccaf1

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
| [feature-installer](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/feature-installer) | `feature-installer` — install devcontainer features at runtime | curl | 1.0.0 |
4949
| [fzf](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/fzf) | `fzf` — general-purpose command-line fuzzy finder | gh release | 1.0.0 |
5050
| [getdnote.com](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/getdnote.com) | `dnote` — simple command-line notebook for developers | gh release | 1.0.0 |
51-
| [gitagent.sh](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/gitagent.sh) | `gitagent` — framework-agnostic, git-native standard for defining AI agents | bun | 1.0.0 |
51+
| [gitagent.sh](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/gitagent.sh) | `gitagent` — framework-agnostic, git-native standard for defining AI agents | bun | 1.0.1 |
5252
| [github.com/cli](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/github.com-cli) | `gh` — GitHub CLI | curl | 1.0.1 |
5353
| [helix-editor.com](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/helix-editor.com) | `hx` — modal text editor with built-in LSP | gh release | 1.0.0 |
5454
| [hermes-agent.nousresearch.com](https://github.com/devcontainer-community/devcontainer-features/tree/main/src/hermes-agent.nousresearch.com) | `hermes` — self-improving AI agent by Nous Research | curl | 1.0.0 |

src/gitagent.sh/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gitagent.sh",
33
"id": "gitagent.sh",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"description": "Install \"gitagent\" binary",
66
"documentationURL": "https://github.com/devcontainer-community/devcontainer-features/tree/main/src/gitagent.sh",
77
"options": {

src/gitagent.sh/install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ install() {
5151
else
5252
bun install -g "@shreyaskapale/gitagent@${VERSION}"
5353
fi
54+
# bun creates a symlink pointing to a .js file with a node shebang.
55+
# Replace it with a shell wrapper that uses bun so node is not required.
56+
local gitagentJs
57+
gitagentJs=$(readlink -f "${binaryTargetFolder}/${binaryName}")
58+
rm "${binaryTargetFolder}/${binaryName}"
59+
printf '#!/bin/sh\nexec bun run "%s" "$@"\n' "${gitagentJs}" > "${binaryTargetFolder}/${binaryName}"
60+
chmod +x "${binaryTargetFolder}/${binaryName}"
5461
apt_get_cleanup
5562
}
5663
echo_banner "devcontainer.community"

test/gitagent.sh/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ source dev-container-features-test-lib
1313
# check <LABEL> <cmd> [args...]
1414

1515
check "check existence" bash -c "ls -lah /usr/local/bin/gitagent"
16+
check "execute command" bash -c "gitagent --version"
1617

1718
# Report results
1819
# If any of the checks above exited with a non-zero exit code, the test will fail.

0 commit comments

Comments
 (0)