From be34d906dbf4606a7b03cc555eaa008c6a88cba5 Mon Sep 17 00:00:00 2001 From: Martin Kuntz Jacobsen Date: Wed, 4 Nov 2026 20:30:38 +0100 Subject: [PATCH] launcher: dx.cmd hand-off passes arguments unchanged (closes #6210) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_011u9TXHDZrfmzFQ2WT8QAKK --- cli/adopt/src/launcher.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cli/adopt/src/launcher.rs b/cli/adopt/src/launcher.rs index 34a8a924c3..b6754168a0 100644 --- a/cli/adopt/src/launcher.rs +++ b/cli/adopt/src/launcher.rs @@ -352,7 +352,7 @@ pushd "%DX_HERE%" 2>nul && (for /f "delims=" %%G in ('git rev-parse --git-common pushd "%DX_ME%" 2>nul && (for /f "delims=" %%G in ('git rev-parse --git-common-dir 2^>nul') do if not defined DX_GB set "DX_GB=%%~fG") & popd if not defined DX_GA goto dxdone if /i not "%DX_GA%"=="%DX_GB%" goto dxdone -call "%DX_HERE%\tools\dx.cmd" %* +"%DX_HERE%\tools\dx.cmd" %* exit /b %errorlevel% :dxdone if not exist "%~dp0..\%DX_PINS%" ( @@ -644,6 +644,16 @@ mod tests { } } + #[test] + fn cmd_hand_off_does_not_expand_arguments_twice() { + let script = cmd(); + let line = script + .lines() + .find(|line| line.ends_with("dx.cmd\" %*")) + .expect("hand-off line"); + assert_eq!(line, "\"%DX_HERE%\\tools\\dx.cmd\" %*"); + } + #[test] fn launcher_bytes_do_not_depend_on_the_dx_version() { let dir = dx_test_scratch::scratch("dx-launcher-static-");