-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix executable() on windows #3512
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
Conversation
This should work as: * SearchPath return TRUE with direct name * File exists with appending extensions contains PATHEXT
Codecov Report
@@ Coverage Diff @@
## master #3512 +/- ##
==========================================
+ Coverage 76.87% 77.16% +0.29%
==========================================
Files 99 99
Lines 136451 139012 +2561
==========================================
+ Hits 104896 107271 +2375
- Misses 31555 31741 +186
Continue to review full report at Codecov.
|
Yasuhiro Matsomoto wrote:
Current implementation of executable() return 1 even though it is not
an executable. On Windows, executable command must have suffix that
contains in PATHEXT. But current implementation check...
Is this really always true? Perhaps it depends on $SHELL?
… * If it have file extension and the name exists in curdir or PATH.
* If the filename with appending suffixes exists in curdir or PATH.
So `executable('shell32.dll')` or `executable('win.ini')` return 1.
--
hundred-and-one symptoms of being an internet addict:
155. You forget to eat because you're too busy surfing the net.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|
If $SHELL is used, the name is used directly. Line 3541 in 2bc152a
|
Fixed by 8.1.0453. |
Current implementation of executable() return 1 even though it is not an executable. On Windows, executable command must have suffix that contains in PATHEXT. But current implementation check...
So
executable('shell32.dll')
orexecutable('win.ini')
return 1.