Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Powershell alias return correct exit codes #1778

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brycegbrazen
Copy link
Contributor

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

Closes #1776.

@brycegbrazen brycegbrazen requested a review from a team as a code owner June 21, 2024 17:29
Signed-off-by: brycegbrazen <[email protected]>
… a process as they both seem to miss certain circumstances

Signed-off-by: brycegbrazen <[email protected]>
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.40%. Comparing base (a13f7bb) to head (3a90505).
Report is 6 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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brycegbrazen
Copy link
Contributor Author

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
Copy link
Member

@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
Copy link
Member

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

@JeanChristopheMorinPerso JeanChristopheMorinPerso added this to the Next milestone Jun 22, 2024
Co-authored-by: Jean-Christophe Morin <[email protected]>
Signed-off-by: Bryce Gattis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using aliases in Powershell muffles exit code
2 participants