Skip to content

Commit df57cf4

Browse files
committed
fix: use current/bin/vp directly in install.sh instead of trampoline
Run env setup through the real binary (current/bin/vp) rather than the trampoline (bin/vp). This avoids the running-exe self-overwrite issue on Windows and is consistent with install.ps1's approach.
1 parent 6bafd60 commit df57cf4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/cli/install.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,11 @@ NPMRC_EOF
663663
cleanup_old_versions
664664

665665
# Create env files with PATH guard (prevents duplicate PATH entries)
666-
local vp_bin="$INSTALL_DIR/bin/vp"
666+
# Use current/bin/vp directly (the real binary) instead of bin/vp (trampoline)
667+
# to avoid the self-overwrite issue on Windows during --refresh
668+
local vp_bin="$INSTALL_DIR/current/bin/vp"
667669
if [[ "$platform" == win32* ]]; then
668-
vp_bin="$INSTALL_DIR/bin/vp.exe"
670+
vp_bin="$INSTALL_DIR/current/bin/vp.exe"
669671
fi
670672
"$vp_bin" env setup --env-only > /dev/null
671673

0 commit comments

Comments
 (0)