Open
Description
Is there any consideration for using goto :eof
rather than exit /b %errorlevel%
in rez suite execution script generation (here: execution.py)? Our team is using GitLb powershell runner to do the deployment, and found out that $LASTEXITCODE is not correct when using rez suite script.
In my test, the Powershell $LASTEXITCODE will not be as expected until I changed goto :eof
to exit /b
.
Environment
~platform==windows (implicit)
~arch==AMD64 (implicit)
~os==windows-10.0.18362.SP0 (implicit)
To Reproduce
- Start from hello_world
- New
hello_world/bin/hello_world.bat
(it is gonna to simply executing thepython hello_world/python/hello_world.py
)
python %~dp0../python/%~n0.py %*
- Build this pacakge
- Create a rez-suite like in https://github.com/AcademySoftwareFoundation/rez/wiki/Suites
rez-suite --create test_suite
rez-env hello_world --output tmp.rxt
rez-suite --add tmp.rxt --context hello_world test_suite
- Explicitly raise some exception in
hello_world/bin/hello_world.py
, runtest_suite/bin/hello_world
in both cmd and powershell
Expected behavior
cmd have %errorlevel% = 1
powershell should have $LASTEXITCODE = 1
Actual behavior
powershell now have $LASTEXITCODE = 0