Skip to content

Init-pants can surprisingly change order of resolution due to HOME/.local/bin addition #31

@akomisarek

Description

@akomisarek

Init-pants can lead to unexpected version of Python/scripts being taken from bin

Let me explain the setup I have encountered:

  1. Not sure why but the image we were using had pip inside the /home/runner/.local/bin
  2. We invoke setup-python before initialising pants. This adds new Python to the PATH. Everything works as expected
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    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