rez icon indicating copy to clipboard operation
rez copied to clipboard

Powershell alias return correct exit codes

Open brycegbrazen opened this issue 1 year ago • 4 comments

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

Closes #1776.

brycegbrazen avatar Jun 21 '24 17:06 brycegbrazen

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 55 commits behind head on main.

Additional details and impacted files
@@            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.

codecov[bot] avatar Jun 21 '24 17:06 codecov[bot]

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.

brycegbrazen avatar Jun 21 '24 18:06 brycegbrazen

@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.

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