From 3921b8e76f6bc38c6e1ea3c504e323be259a0dff Mon Sep 17 00:00:00 2001 From: db39 <88856877+db39@users.noreply.github.com> Date: Fri, 17 Jan 2025 12:35:55 +0000 Subject: [PATCH] Fix FORCE_INSTALL when using simple install commands (#1865) Resolves #1864 This change updates `get-install.sh` to preserve the `FORCE_INSTALL` environment variable when running `sudo ./install`. This allows users to set `FORCE_INSTALL` before running the simple install commands. To test live on a device, install Raspberry Pi OS Bullseye 32-bit and run: ```bash export FORCE_INSTALL=1 ``` And then: ```bash curl \ --silent \ --show-error \ https://raw.githubusercontent.com/tiny-pilot/tinypilot/refs/heads/1864-force_install-doesnt-work-as-expected/get-tinypilot.sh | \ bash - && \ sudo reboot ``` Review
on CodeApprove --- get-tinypilot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-tinypilot.sh b/get-tinypilot.sh index 96db0348d..ec44febe4 100755 --- a/get-tinypilot.sh +++ b/get-tinypilot.sh @@ -160,7 +160,7 @@ fi # Run install. pushd "${INSTALLER_DIR}" sudo \ - TMPDIR="${TMPDIR}" \ + --preserve-env=TMPDIR,FORCE_INSTALL \ ./install } # Prevent the script from executing until the client downloads the full file.