Improve gui build script for local development#20971
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b87d148. Configure here.
| # Ubuntu special cases above. | ||
| if [ ! "$CI" ]; then | ||
| echo "Undoing any package-lock.json changes before submodule update" | ||
| git checkout package-lock.json |
There was a problem hiding this comment.
Checkout wrong repo lockfile path
High Severity
Before submodule update, install-gui.sh runs git checkout package-lock.json in the parent chia-blockchain tree. That repo does not track a root package-lock.json (the GUI lockfile is in chia-blockchain-gui), so checkout typically fails and set -o errexit stops the local GUI install.
Reviewed by Cursor Bugbot for commit b87d148. Configure here.
Coverage Report for CI Build 26888106101Coverage decreased (-0.007%) to 91.487%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions15 previously-covered lines in 5 files lost coverage.
Coverage Stats💛 - Coveralls |


Purpose:
no.
Current Behavior:
New Behavior:
Testing Notes:
Note
Low Risk
Single-line guard in the local install path only; no CI, auth, or runtime logic changes.
Overview
For local (non-CI) GUI installs,
install-gui.shnow resets the repo rootpackage-lock.jsonwithgit checkoutimmediately beforegit submodule update, with a short log line explaining why.This avoids carrying accidental lockfile edits from local
npmwork into the submodule update and subsequentnpm ciinchia-blockchain-gui, aligning with the same “restore lockfile before build” idea used elsewhere (e.g. clean-runner). CI behavior is unchanged ($CIstill skips this block).Reviewed by Cursor Bugbot for commit b87d148. Bugbot is set up for automated code reviews on this repo. Configure here.