Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion cli/adopt/src/launcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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%" (
Expand Down Expand Up @@ -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-");
Expand Down
Loading