-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
File.executable? raises an exception if the file_path
is non-existent and native disabled
#2297
Comments
This causes this #which function in bundler to raise an exception insead of properly installing the gems :( |
It looks like this doesn't reproduce on Mac OS X or Linux, but does on FreeBSD :(
|
that is the same thing we had with file?, dir? and readable? - they all |
just read the thread again. this also means on FreeBSD the JFFI native lib |
Repro on MacOS or anywhere (tip o the hat to mkristian):
|
file_path
is non-existentfile_path
is non-existent and native disabled
use the new canExecute method from the FileResource to answer the question. for File#executable_real? use posix if native is available. also added tests for executable? as well for executable_real?. fixes #2297 Sponsored by Lookout Inc.
Fixed in jnr-posix. LibcHelper was throwing ENOENT on failure (which is used by pure-Java impl). It should return -1 and let the higher level one do it. |
And of course, on JRuby 1.7.17:
The text was updated successfully, but these errors were encountered: