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

Force interactive shell for common shells #3

Closed
silverwind opened this issue Jul 10, 2015 · 8 comments
Closed

Force interactive shell for common shells #3

silverwind opened this issue Jul 10, 2015 · 8 comments

Comments

@silverwind
Copy link
Collaborator

Spawned by sindresorhus/fix-path#3

To handle cases like where zsh users wrongly put PATH modifications into .zshrc instead of zshenv, we should consider using the -i flag to force an interactive shell to obtain the full PATH.

What needs to be done is to investigate which shells have an -i flag or similar.

@sindresorhus
Copy link
Owner

Hah, I was just going to open this issue. Definitely.

@silverwind
Copy link
Collaborator Author

bash, zsh, dash, fish come to mind as popular shells, anything else you'd see worth investigating?

@sindresorhus
Copy link
Owner

sh

@sindresorhus
Copy link
Owner

Thanks @silverwind :D

@silverwind
Copy link
Collaborator Author

Looks -iis ubiquitous to all five tested shells, so I went ahead and changed it. With my pretty heavy .zshrc it increased the execution time of that execFile quite a bit, but I say it's worth it for accuracy.

@sindresorhus
Copy link
Owner

Definitely worth it. Even I initially my environment variables in .zshrc.

@sindresorhus
Copy link
Owner

@silverwind I owe you many times. Let me know whenever you would like some feedback/brainstorming on anything at all ;)

@silverwind
Copy link
Collaborator Author

Happy to help. I'll make sure to use your ama if anything comes to mind 😉

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