fix(portable): honor bundled OpenClaw version on USB

This commit is contained in:
hfshfg
2026-06-20 15:59:09 +08:00
parent 8981c21262
commit 19774a89ab
4 changed files with 12 additions and 5 deletions

View File

@@ -105,8 +105,9 @@ if exist "%CORE_DIR%\node_modules\openclaw" goto skip_openclaw_install
echo [INSTALL] Installing OpenClaw...
if not exist "%CORE_DIR%" mkdir "%CORE_DIR%" 2>nul
REM Read pinned OpenClaw version from repo root
set "OPENCLAW_VERSION_FILE=%~dp0..\OPENCLAW_VERSION"
REM Read pinned OpenClaw version from portable root, then repo root in dev checkouts
set "OPENCLAW_VERSION_FILE=%~dp0OPENCLAW_VERSION"
if not exist "%OPENCLAW_VERSION_FILE%" set "OPENCLAW_VERSION_FILE=%~dp0..\OPENCLAW_VERSION"
set "OPENCLAW_VERSION=2026.4.29"
if exist "%OPENCLAW_VERSION_FILE%" (
for /f "usebackq delims=" %%v in ("%OPENCLAW_VERSION_FILE%") do set "OPENCLAW_VERSION=%%v"