Init-pants can lead to unexpected version of Python/scripts being taken from bin
Let me explain the setup I have encountered:
- Not sure why but the image we were using had
pip inside the /home/runner/.local/bin
- We invoke setup-python before initialising pants. This adds new Python to the PATH. Everything works as expected
- Now invoking init-pants performed the following:
|
else |
|
echo "$HOME/.local/bin" >> $GITHUB_PATH |
|
fi |
This adds /home/runner/.local/bin again to the beginning of the list.
This lead to wrong pip resolution as the one from ./local/bin is used instead of the newly installed one.
Expected behaviour would be not to modify PATH if .local/bin is already on the path maybe?
I am also questioning our ./local/bin having Pip but it's different story!
Thoughts?
Init-pants can lead to unexpected version of Python/scripts being taken from bin
Let me explain the setup I have encountered:
pipinside the/home/runner/.local/binactions/init-pants/action.yaml
Lines 110 to 112 in d767b35
This adds /home/runner/.local/bin again to the beginning of the list.
This lead to wrong pip resolution as the one from ./local/bin is used instead of the newly installed one.
Expected behaviour would be not to modify PATH if .local/bin is already on the path maybe?
I am also questioning our ./local/bin having Pip but it's different story!
Thoughts?