Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting adding to PATH on non-Windows platforms #10

Closed
LPGhatguy opened this issue May 23, 2022 · 1 comment
Closed

Supporting adding to PATH on non-Windows platforms #10

LPGhatguy opened this issue May 23, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@LPGhatguy
Copy link
Owner

We can follow what Cargo does here.

They append to ~/.zshenv and/or ~/.profile the following:

. "$HOME/.cargo/env"

and then include this script, ~/.cargo/env:

#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac

This seems reasonable to me.

@LPGhatguy LPGhatguy added the enhancement New feature or request label May 23, 2022
@LPGhatguy
Copy link
Owner Author

Solved by #16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant