Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(scripts): avoid delayed expansion in run-dev-win launcher

Oii611188d2140c8321
diff --git a/scripts/run-dev-win.cmd b/scripts/run-dev-win.cmd
index 188dc6f812..ad111b57fe 100644
--- a/scripts/run-dev-win.cmd
+++ b/scripts/run-dev-win.cmd
@@ -1,5 +1,5 @@
@echo off
-setlocal EnableDelayedExpansion
+setlocal
rem Change to the repository root so Git Bash receives a stable relative path.
cd /d "%~dp0.."
@@ -9,17 +9,19 @@ if exist "%ProgramFiles%\Git\bin\bash.exe" set "GIT_BASH=%ProgramFiles%\Git\bin\
if not defined GIT_BASH if exist "%ProgramFiles(x86)%\Git\bin\bash.exe" set "GIT_BASH=%ProgramFiles(x86)%\Git\bin\bash.exe"
if not defined GIT_BASH if exist "%LOCALAPPDATA%\Programs\Git\bin\bash.exe" set "GIT_BASH=%LOCALAPPDATA%\Programs\Git\bin\bash.exe"
-if not defined GIT_BASH (
- where bash >nul 2>nul
- if not errorlevel 1 (
- bash "scripts/run-dev-win.sh"
- exit /b !errorlevel!
- )
+if defined GIT_BASH goto :found
- echo [run-dev-win] Git Bash not found.
- echo [run-dev-win] Install Git for Windows or add bash.exe to PATH.
- exit /b 1
-)
+where bash >nul 2>nul
+if errorlevel 1 goto :notfound
+bash "scripts/run-dev-win.sh"
+exit /b %errorlevel%
+
+:notfound
+echo [run-dev-win] Git Bash not found.
+echo [run-dev-win] Install Git for Windows or add bash.exe to PATH.
+exit /b 1
+
+:found
"%GIT_BASH%" "scripts/run-dev-win.sh"
-exit /b !errorlevel!
+exit /b %errorlevel%