kr / hk

Fast Heroku client
https://hk.heroku.com/
77 stars 6 forks source link

exec.LookPath returns unwanted results #81

Open kr opened 10 years ago

kr commented 10 years ago

LookPath tries to mimic shell behavior closely, including special case logic for names containing /. For hk plugins, this is wrong; we don't want to pick up random executable files relative to the current directory.

Consider the following transcript:

$ printf '#!/bin/sh\necho hello\n' >foo
$ chmod +x foo
$ hk ./foo
hello

The correct behavior here would be Unknown command: ./foo.