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

Using aliases in Powershell muffles exit code #1776

Open
brycegbrazen opened this issue Jun 20, 2024 · 0 comments · May be fixed by #1778
Open

Using aliases in Powershell muffles exit code #1776

brycegbrazen opened this issue Jun 20, 2024 · 0 comments · May be fixed by #1778
Labels
bug os:windows Windows-specific shell Shell related issues

Comments

@brycegbrazen
Copy link
Contributor

Running an alias using the Powershell shell plugin with rez-env doesn't return the correct exit code when running the command in-line.

Environment

  • Windows 10
  • Rez 2.112.0
  • Rez python version 3.7.9

To Reproduce

  1. Create a package.py for a test_alias package with the following definition:
name = "test_alias"

version = "1.0.0"

build_command = ""

def commands():
    alias('make_error', 'python')
  1. Install the package to your package repository.
  2. Run rez-env python -c "raise"
  3. Observe $LASTEXITCODE as being 1 as expected.
  4. Run rez-env make_error -c "raise"
  5. Observe $LASTEXITCODE as being 0 instead of the correct value of 1.

Expected behavior
$LASTEXITCODE is 1.

Actual behavior
$LASTEXITCODE is 0.

@brycegbrazen brycegbrazen linked a pull request Jun 21, 2024 that will close this issue
@JeanChristopheMorinPerso JeanChristopheMorinPerso added os:windows Windows-specific shell Shell related issues labels Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug os:windows Windows-specific shell Shell related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants