AcademySoftwareFoundation / rez

An integrated package configuration, build and deployment system for software
https://rez.readthedocs.io
Apache License 2.0
916 stars 328 forks source link

Powershell alias return correct exit codes #1778

Open brycegbrazen opened 2 weeks ago

brycegbrazen commented 2 weeks ago

Fixes issue where powershell plugins were not correctly capturing exit codes when aliased commands failed.

Closes #1776.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 58.40%. Comparing base (a13f7bb) to head (3a90505). Report is 6 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1778 +/- ## ========================================== - Coverage 58.41% 58.40% -0.01% ========================================== Files 126 126 Lines 17163 17165 +2 Branches 3506 3506 ========================================== + Hits 10025 10026 +1 - Misses 6473 6474 +1 Partials 665 665 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

brycegbrazen commented 2 weeks ago

Looks like Python isn't installed to all of our action VMs? Not sure what other command I could use that's shell agnostic outside of echo. I don't think there's a way to make echo fail as I need this test to.

JeanChristopheMorinPerso commented 2 weeks ago

@brycegbrazen these tests are complex, so reuse what's already there and don't call python directly. Look at the test_command test. It uses a pre-configured hello_world command that I think can be instructed to exit with a specific exit code.

JeanChristopheMorinPerso commented 2 weeks ago

https://github.com/AcademySoftwareFoundation/rez/blob/main/src%2Frez%2Fbind%2Fhello_world.py#L34