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

Add only the current project's bin directory to $PATH #188

Closed
croaky opened this issue Sep 6, 2013 · 4 comments
Closed

Add only the current project's bin directory to $PATH #188

croaky opened this issue Sep 6, 2013 · 4 comments

Comments

@croaky
Copy link
Contributor

croaky commented Sep 6, 2013

From https://github.com/sstephenson/rbenv/wiki/Understanding-binstubs#adding-project-specific-binstubs-to-path

export PATH="$PWD/bin:$PATH"
hash -r 2>/dev/null || true
@croaky
Copy link
Contributor Author

croaky commented Sep 6, 2013

This is a similar attempt to standardize our binstub usage as #166. Our research card is at https://trello.com/card/use-bin-for-binstubs-directory/50f06fb01e671a2e2200ad9a/107

@croaky
Copy link
Contributor Author

croaky commented Sep 6, 2013

I should note that I don't understand what hash -r 2>/dev/null || true is doing.

@pbrisbin
Copy link

pbrisbin commented Sep 6, 2013

hash -r is required when changing PATH because the shell caches program lookup. The redirect and or-true is probably just so that the function operates silently and returns successfully regardless of what hash has to say about it.

@croaky
Copy link
Contributor Author

croaky commented Sep 11, 2013

Trying an approach @joshuaclayton mentioned:

#191

@croaky croaky closed this as completed Sep 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants