Skip to content

~/.local/env PATH setup is not ideal in VS Code, on macOS #2390

Description

@gaborcsardi

Apparently, VS Code adds ~/.local/bin to the PATH before it starts the integrated terminal.

Then when the terminal starts macOS prepends /etc/paths (and probably the stuff in /etc/paths.d) to the PATH, and /etc/paths has /usr/local/bin (and others) by default.

So when ~/.local/bin/env runs, ~/.local/bin is already on the PATH, so it does not prepend it. But it is in the wrong position, because it is after /usr/local/bin, so it does not override system-installed binaries, like it was meant to be.

I verified all this on a vanilla macOS installation with a vanilla VS Code install.

I am not sure what the good fix would be for this, for now my installer will just unconditionally prepend ~/.local/bin/ to the PATH.

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