prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.38k stars 192 forks source link

Activation of `global install` bins are overwriting the path, affect program like `pueue add` #2507

Open way-zer opened 3 days ago

way-zer commented 3 days ago

Checks

Reproducible example

pixi global install "pueue" -c dnachun -c conda-forge
pueued -d #start deamon
export PATH="TEST:$PATH" # or pixi shell in another project
pueue add env 
pueue log -f 1 | grep PATH # will get wrong PATH

Issue description

May like #133. pixi global will overwrite PATH and CONDA_PREFIX(no affect this example), so the actual execuable will get wrong PATH variable.

Maybe provide a way to expose binary without activation, and maybe use symbol link.

Expected behavior

not overwrite or just append necessary paths to PATH variable.

Hofer-Julian commented 3 days ago

Thanks for the issue. We'd be open to a --no-activation option. Just haven't gotten around implementing it yet

wolfv commented 3 days ago

@Hofer-Julian didn't we discuss to keep the path dynamic? We could easily react to PATH changes without changing the rest of the logic

Hofer-Julian commented 3 days ago

@Hofer-Julian didn't we discuss to keep the path dynamic? We could easily react to PATH changes without changing the rest of the logic

Yes, that is indeed the more elegant solution for this specific problem

way-zer commented 2 days ago

The current implement seems break many things, like pixi global make. When use make, it even can't found binary in current PATH.

It's confusing to get this. Image

We could easily react to PATH changes without changing the rest of the logic

dynamic PATH may be the best answer, considering the confusing problem without using --no-activation

So, this issue may be bug, instead of enhancement. (The PATH should be dynamic)