Openclaw 环境变量乱码 (#293)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Haze <hazeone@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,16 @@ if /i "%1"=="update" (
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
rem Switch console to UTF-8 so Unicode box-drawing and CJK text render correctly
|
||||
rem on non-English Windows (e.g. Chinese CP936). Save the previous codepage to restore later.
|
||||
for /f "tokens=2 delims=:." %%a in ('chcp') do set /a "_CP=%%a" 2>nul
|
||||
chcp 65001 >nul 2>&1
|
||||
|
||||
set ELECTRON_RUN_AS_NODE=1
|
||||
set OPENCLAW_EMBEDDED_IN=ClawX
|
||||
"%~dp0..\..\ClawX.exe" "%~dp0..\openclaw\openclaw.mjs" %*
|
||||
endlocal
|
||||
set _EXIT=%ERRORLEVEL%
|
||||
|
||||
if defined _CP chcp %_CP% >nul 2>&1
|
||||
|
||||
endlocal & exit /b %_EXIT%
|
||||
|
||||
Reference in New Issue
Block a user