You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (unsignedint i = 0; i < sizeof(extensions); i++) {
if (endsWith(path, extensions[i])) {
returntrue;
}
}
}
(Since ucs4string is now explicit, we cannot instantiate them in this way.)
Win32 do not have "executable" bit on its filesystem so ultimately we cannot implement this. We can consider multiple implementations and need to choose one:
a) Decide on file extension (Previous implementation)
consider "double-click-to-execute" files as executable.
Previous implementation is incomplete; use PATHEXT to get precise result
(I once tried writing a procedure to get the filename of the running executable, and faced similar difficulties. The solution was to remove the whole procedure :-)
What's the use case for an isExecutable procedure?
Mosh(-scheme) has been originally developed to implement Scheme-shell -- if we wanted to implement TAB completion for a command line, we'd need one to pick-up executable from PATH.
On Windows, I think it's for completeness; world's being dominated by POSIX. Even WASI -- which is intended to be write-once-run-anywhere -- have executable bit for now.
I'm going to temporarily comment-out Win32
isExecutable
implementation since it doesn't compile on the latest source.mosh/src/OSCompat.cpp
Lines 680 to 688 in 9353555
(Since
ucs4string
is nowexplicit
, we cannot instantiate them in this way.)Win32 do not have "executable" bit on its filesystem so ultimately we cannot implement this. We can consider multiple implementations and need to choose one:
PATHEXT
to get precise resultisExecutable
true, Win32 APICreateProcess
might not accept itfalse
(My preference).exe
evaluated asfalse
true
The text was updated successfully, but these errors were encountered: