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

Make it clearer when stack installs to a spot that's not on the PATH or shadowed on the PATH #1362

Closed
mgsloan opened this issue Nov 18, 2015 · 0 comments
Assignees
Milestone

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Nov 18, 2015

We already have a warning about this, but it gets lost in the mix:

Installing library in
/tmp/stack-upgrade17612/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/lib/x86_64-linux-ghc-7.10.2/stack-0.1.7.0-1qCQzKMpF5B2dxtC0o3K2h
Installing executable(s) in
/tmp/stack-upgrade17612/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/bin
Registering stack-0.1.7.0...
Completed all 2 actions.
Installation path /home/mgsloan/.local/bin not found in PATH environment variable
Copying from /tmp/stack-upgrade17612/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/bin/stack to /home/mgsloan/.local/bin/stack

Copied executables to /home/mgsloan/.local/bin:
- stack

There's a Installation path /home/mgsloan/.local/bin not found in PATH environment variable hiding in there. I'd rather see:

Completed all 2 actions.
Copying from /tmp/stack-upgrade17612/stack/.stack-work/install/x86_64-linux/lts-3.7/7.10.2/bin/stack to /home/mgsloan/.local/bin/stack

Copied executables to /home/mgsloan/.local/bin:
- stack

WARNING: Installation path /home/mgsloan/.local/bin not found in PATH environment variable.

There's also the case where the installation path is on the PATH, but some earlier dir in PATH also contains an executable with this name (shadowing). In this case, I think it makes sense to output something like WARNING: The "stack" executable found on the PATH environment variable is /usr/bin/stack, and not the version that was just installed. This means that "stack" calls on the command line will not use this version.

@mgsloan mgsloan added this to the P2: Should milestone Nov 18, 2015
sjakobi added a commit to sjakobi/stack that referenced this issue Jan 2, 2016
sjakobi added a commit to sjakobi/stack that referenced this issue Jan 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants