fix: preserve node_modules during upgrade to avoid re-downloading Electron
The upgrade was wiping node_modules then relying on npm to re-download the ~120MB Electron binary. npm returns exit 0 even when the download times out, leaving the kiosk with no Electron binary and a blank screen on next boot. node_modules only needs to be deleted on a fresh install or when explicitly changing Electron version. For a JS-file-only upgrade, npm install without a wipe is either a no-op (no changes) or applies dependency updates cleanly. The install_electron_binary fallback remains as a safety net. https://claude.ai/code/session_01EyjEQLWbTXcZgbMDarf7NU
This commit is contained in:
@@ -11093,8 +11093,8 @@ upgrade_kiosk() {
|
|||||||
sudo rm -f "$KIOSK_DIR/pause-dialog.html"
|
sudo rm -f "$KIOSK_DIR/pause-dialog.html"
|
||||||
sudo rm -f "$KIOSK_DIR/pin-entry.html"
|
sudo rm -f "$KIOSK_DIR/pin-entry.html"
|
||||||
sudo rm -f "$KIOSK_DIR/inactivity-prompt-extended.html"
|
sudo rm -f "$KIOSK_DIR/inactivity-prompt-extended.html"
|
||||||
sudo rm -rf "$KIOSK_DIR/node_modules"
|
# node_modules is NOT removed — preserves the Electron binary (~120MB download)
|
||||||
sudo rm -f "$KIOSK_DIR/package-lock.json"
|
# npm install below is a no-op if dependencies haven't changed
|
||||||
log_success "Old files removed"
|
log_success "Old files removed"
|
||||||
|
|
||||||
echo "[4/6] Extracting new app files from script..."
|
echo "[4/6] Extracting new app files from script..."
|
||||||
|
|||||||
Reference in New Issue
Block a user