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

Improved detection on Linux. #36

Closed
wants to merge 3 commits into from
Closed

Conversation

oboecat
Copy link

@oboecat oboecat commented Jun 28, 2018

At the moment when looking for commands on Linux, it executes echo $(which -a cmd1; which -a cmd2; ...etc), which outputs the paths separated by spaces instead of \n.
Instead of executing multiple instances of which, my changes pass which all the commands that need to be queried. This is probably more stable.

@oboecat oboecat mentioned this pull request Jun 29, 2018
3 tasks
@sindresorhus
Copy link
Owner

Are you sure which -a always outputs on the same line? At least on macOS, which is BSD based, it outputs on separate lines.

@sindresorhus
Copy link
Owner

This also needs to handle if the command doesn't exist.

❯ which -a foo bar
foo not found
bar not found

@sindresorhus
Copy link
Owner

Closing because of #42

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

Successfully merging this pull request may close these issues.

None yet

2 participants