Extend batch file to use run commands

This commit is contained in:
2022-11-11 15:54:35 +01:00
parent 8f2359ffc6
commit a68b4f520d
3 changed files with 36 additions and 2 deletions

View File

@@ -11,6 +11,8 @@ IF %4 == linux (
set target=x86_64-unknown-linux-musl
)
IF defined CARGO_RUN_ARGS set run_args=-- %CARGO_RUN_ARGS%
IF %2 == build set run_build=1
IF %2 == test set run_build=1
@@ -28,7 +30,7 @@ IF defined run_build (
IF %2 == run (
echo cargo run %1 --%3
cargo run --%3 --target=%target%
cargo run --%3 --target=%target% %run_args%
exit /B %ERRORLEVEL%
)