use /sandbox/<proj_name> instead of /project as workdir in container (#64)

This commit is contained in:
Olcan 2025-04-20 14:49:02 -07:00 committed by GitHub
parent 9d608135e3
commit c80800a3ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
IMAGE=gemini-code-sandbox
CLI_DIST=/usr/local/share/npm-global/lib/node_modules/\@gemini-code/cli
WORKDIR=/sandbox/$(basename "$PWD")
# use docker if installed, otherwise try to use podman instead
if command -v docker &> /dev/null; then
@ -13,4 +14,4 @@ else
exit 1
fi
$CMD run -it --rm -v"$PWD:/project" --workdir /project "$IMAGE" node "$CLI_DIST"
$CMD run -it --rm -v"$PWD:$WORKDIR" --workdir "$WORKDIR" "$IMAGE" node "$CLI_DIST"