Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Oct 26, 2023
1 parent 95cc7f3 commit a95d281
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 6 additions & 7 deletions util/process_wrapper/process_wrapper.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@ECHO OFF
@REM @ECHO OFF
SETLOCAL enabledelayedexpansion

:: The first argument is expected to be `--`, this must be skipped
Expand All @@ -15,18 +15,17 @@ for %%A in (%*) do (
:: Ensure the rustc.exe path is executable by sanitizing any `/` to `\`
SET "arg=%%~A"
SET "arg=!arg:/=\!"
SET "arg=!arg:=^=!"
SET "command_args=!command_args! !arg!"
) else (
:: Account for any arguments which contain `${pwd}` (a place holder for the current working directiron)
set "arg=%%~A"
set "arg=!arg:${pwd}=%CD%!"
set "command_args=!command_args! !arg!"
SET "arg=%%~A"
SET "arg=!arg:${pwd}=%CD%!"
SET "arg=!arg:=^=!"
SET "command_args=!command_args! !arg!"
)
SET /a "arg_count+=1"
)

:: append "--remap-path-prefix" with the current working directory
SET "command_args=!command_args! "--remap-path-prefix=%CD%="

:: Execute the provided command with arguments
%command_args%
2 changes: 0 additions & 2 deletions util/process_wrapper/process_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,4 @@ for arg in "$@"; do
args+=("${arg}")
done

set -x

exec "${args[@]}"

0 comments on commit a95d281

Please sign in to comment.