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

The find statement fails on Windows #69

Closed
kodybrown opened this issue Mar 11, 2014 · 2 comments
Closed

The find statement fails on Windows #69

kodybrown opened this issue Mar 11, 2014 · 2 comments

Comments

@kodybrown
Copy link

The following statement fails; user_interaction.rb line #240:

find {|name| system("hash #{name.split.first} 2>&-") }

I changed it to this, which now works:

find {|name| system("hash #{name.split.first} 2>&1") }

But, now I don't know where to find hash.. Is this a bash util or built-in lib somewhere? I tried gem install hash but it does not seem to be what it is looking for..

I'm running bro (on Windows) which uses commander..

@ggilder
Copy link
Collaborator

ggilder commented Mar 12, 2014

hash is a shell builtin that shows you the cached hash table of available commands.

It looks like a change to &1 would be ok here since we're not using the output of hash. Normally &- is used to close a file descriptor, see http://www.tldp.org/LDP/abs/html/io-redirection.html

Does that change solve the issue for you, or is there still some issue with hash?

If it solves it feel free to put together a pull request. Thanks!

@ggilder
Copy link
Collaborator

ggilder commented Apr 1, 2015

This issue was moved to commander-rb/commander#4

@ggilder ggilder closed this as completed Apr 1, 2015
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