fix: Update install.sh file - #320
Conversation
- Use `$BRANCH_NAME` in `INSTALL_URL` instead of hardcoded `develop` - Add `non_default_env()`, which re-emits `PILOT_GITHUB_SLUG/PILOT_BRANCH/PILOT_DEV` in the printed re-run commands whenever they differ from defaults
32b5a68 to
5c40d1d
Compare
|
Ignore the reviews if wrong, trying some code review tool. |
|
@beagle-app review |
Confidence Score: 3/5Fix first: the rerun path drops DEV_MODE and PILOT_REPO_URL from the recorded command. The saved rerun command in install.sh omits these two environment variables, so a maintainer who reruns it gets the wrong runtime behavior. Store both values before the command is recorded. install.sh: persist DEV_MODE and PILOT_REPO_URL into the rerun command Reviewed up to z-ai/glm-5.2 · 9178 in / 963 out (576 cached) · 23.57s · |
| out="" | ||
| [ "$GITHUB_SLUG" = "frappe/pilot" ] || out="$out PILOT_GITHUB_SLUG=$GITHUB_SLUG" | ||
| [ "$BRANCH_NAME" = "develop" ] || out="$out PILOT_BRANCH=$BRANCH_NAME" | ||
| [ -z "$DEV_MODE" ] || out="$out PILOT_DEV=1" |
There was a problem hiding this comment.
🟡 P2 — Re-Run Command Loses DEV_MODE And PILOT_REPO_URL
non_default_env emits PILOT_GITHUB_SLUG but not PILOT_REPO_URL, and does not reliably forward DEV_MODE when it is set as a shell variable rather than an exported env var. When a user sets PILOT_REPO_URL to point at a local file path or alternate host (as the smoke tests do), the printed re-run command omits it and the second invocation clones from the default GitHub URL instead of the intended repository. Similarly, DEV_MODE set via --dev flag parsing may not be exported, so su - $BENCH_USER and wget ... | sh re-run commands will not carry it.
Give this to a coding agent
Fix this in the repository. Change nothing else.
install.sh:84
install.sh:489
[P2 bug] Re-Run Command Loses DEV_MODE And PILOT_REPO_URL
non_default_env emits PILOT_GITHUB_SLUG but not PILOT_REPO_URL, and does not reliably
forward DEV_MODE when it is set as a shell variable rather than an exported env var.
When a user sets PILOT_REPO_URL to point at a local file path or alternate host (as the
smoke tests do), the printed re-run command omits it and the second invocation clones
from the default GitHub URL instead of the intended repository. Similarly, DEV_MODE set
via `--dev` flag parsing may not be exported, so `su - $BENCH_USER` and `wget ... | sh`
re-run commands will not carry it.
bug · confidence 75% · reply to this comment if it is wrong and I will remember
$BRANCH_NAMEinINSTALL_URLinstead of hardcodeddevelopnon_default_env(), which re-emitsPILOT_GITHUB_SLUG/PILOT_BRANCH/PILOT_DEVin the printed re-run commands whenever they differ from defaults