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

Fix which command on ubuntu #7

Closed
wants to merge 1 commit into from
Closed

Conversation

fbernier
Copy link

Hi, the 'which' command has no option '-s' on my system (ubuntu 12.10). which makes the command fail and return a bad exit status. I figured just redirecting the output to /dev/null would fix this issue for me while remaining compatible with OSX.

@toy
Copy link
Owner

toy commented Jan 16, 2013

Hi François,
This will not work as > will be escaped, try system(*%W[which man > /dev/null]).
Also I think it is better to extract this system call to private method like bin_accessible?(bin).

@fbernier
Copy link
Author

Indeed I did this way too quickly. I'll come up with something later.

@toy toy closed this in 049b56a Jan 16, 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

Successfully merging this pull request may close these issues.

2 participants