Skip to content

fix: Update install.sh file - #320

Open
AyshaHakeem wants to merge 2 commits into
frappe:developfrom
AyshaHakeem:fix-hardcoded-branch-name
Open

fix: Update install.sh file#320
AyshaHakeem wants to merge 2 commits into
frappe:developfrom
AyshaHakeem:fix-hardcoded-branch-name

Conversation

@AyshaHakeem

Copy link
Copy Markdown
Contributor
  • 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

- 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
@AyshaHakeem
AyshaHakeem force-pushed the fix-hardcoded-branch-name branch from 32b5a68 to 5c40d1d Compare July 30, 2026 06:43
@tanmoysrt

Copy link
Copy Markdown
Member

Ignore the reviews if wrong, trying some code review tool.

@tanmoysrt

Copy link
Copy Markdown
Member

@beagle-app review

@beagle-app

Copy link
Copy Markdown
Collaborator

Confidence Score: 3/5

Fix 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 a0e7492 fix: Detect mismatch in repo path

z-ai/glm-5.2 · 9178 in / 963 out (576 cached) · 23.57s · @beagle-app review to run again

Comment thread install.sh
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"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

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.

3 participants