fix(build): forward script arguments when using privilege escalation on Windows
Description
When using privilege escalation on Windows, additional script arguments are not passed to the child admin process.
Steps to reproduce
- Build a project requiring admin rights on Windows
- Try to launch a batch script with additional arguments, like "--clog"
- Ensure that the argument has not been taken into acount
Functional specifications
- Fix the passing of arguments
Technical specifications
-
Two places need to be updated:
-
Change:
"if %errorlevel%==1 (powershell start -verb runas '%0' & exit /b)\n"
- To
"if %errorlevel%==1 (powershell start -verb runas '%0' %* & exit /b)\n"
Test plan
- Make sure passed arguments are correctly passed