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

Exit code always 0 when running task inside activated environment #3308

Open
2 tasks done
voodoo11 opened this issue Mar 10, 2025 · 0 comments
Open
2 tasks done

Exit code always 0 when running task inside activated environment #3308

voodoo11 opened this issue Mar 10, 2025 · 0 comments

Comments

@voodoo11
Copy link

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

[project]
channels = ["conda-forge"]
name = "test"
platforms = ["linux-64"]

[tasks]
fail = "exit 1"
> pixi shell
> pixi run fail
> echo $?
0

Issue description

When running a task inside an activated environment, the exit code is always 0, even if the task fails. Running the same task outside the environment correctly returns the expected exit code.

Pixi version: 0.42.1

Expected behavior

Behavior should be consistent inside and outside the environment. If the task fails, pixi run should return a non-zero exit code.

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

No branches or pull requests

1 participant