From 114908cd9fbc6921dd1dd3839b5bfcc6c707b909 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 23 Apr 2026 04:46:03 -0700 Subject: [PATCH] fix(install): clear STUDIO_LOCAL_* env on POSIX normal install (#5146) install.sh's normal-install branch passed the inherited parent-shell environment to setup.sh without resetting STUDIO_LOCAL_INSTALL or STUDIO_LOCAL_REPO. Consumers treat either as truthy: studio/setup.sh:491 checks STUDIO_LOCAL_INSTALL != "1" studio/install_python_stack.py:868 reads STUDIO_LOCAL_REPO, falsy if empty Net effect: if a user or developer shell has stale STUDIO_LOCAL_* exports from a previous --local run, a subsequent 'normal' install or desktop-managed install silently takes the local-dev path: version checks are skipped and an editable overlay points at the stale repo. Fix mirrors install.ps1:1082-1087 on Windows: set STUDIO_LOCAL_INSTALL=0 and STUDIO_LOCAL_REPO= explicitly in the env prefix for the non-local branch so setup.sh sees a clean state regardless of parent exports. Co-authored-by: Daniel Han --- install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install.sh b/install.sh index 0352887de1..b1663ba0ff 100755 --- a/install.sh +++ b/install.sh @@ -1587,8 +1587,15 @@ if [ "$STUDIO_LOCAL_INSTALL" = true ]; then UNSLOTH_NO_TORCH="$SKIP_TORCH" \ bash "$SETUP_SH"