Skip to content

Ignore PIXI_ env vars when --manifest-path is different to PIXI_PROJECT_ROOT #5395

@Hofer-Julian

Description

@Hofer-Julian

Sometimes you a pixi task of another env with a pixi task.
A Pixi task sets multiple env vars including PIXI_PROJECT_ROOT, PIXI_IN_SHELL and PIXI_ENVIRONMENT_NAME.

Reproducer:

# root dir
[workspace]
channels = ["https://prefix.dev/conda-forge"]
name = "env-var"
platforms = ["linux-64"]
version = "0.1.0"

[feature.test.tasks]
test = "pixi run --manifest-path test"


[environments]
test = ["test"]
# test dir
[workspace]
channels = ["https://prefix.dev/conda-forge"]
name = "test"
platforms = ["linux-64"]
version = "0.1.0"


[tasks]
test = "echo hello"

Running this gives:

pixi run test
✨ Pixi task (test in test): pixi run --manifest-path test                                                                                                                                             
Error:   × unknown environment 'test'

However this should work.

If $PIXI_PROJECT_ROOT isn't the same as your given --manifest-path the other PIXI_ env vars should be ignored as well

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions