[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36270: executable-find does not find shell commands on MSYS2
From: |
Juanma Barranquero |
Subject: |
bug#36270: executable-find does not find shell commands on MSYS2 |
Date: |
Tue, 18 Jun 2019 22:49:33 +0200 |
On Tue, Jun 18, 2019 at 6:51 PM Eli Zaretskii <eliz@gnu.org> wrote:
> We want to declare a file "executable" only if it can be invoked by _all_
> possible means of running an executable file.
Sure. But let's perhaps agree that there's something to be said for
files that are "almost executable". shell-command and variants are
used (counting *very* roughly) about 150 times in the elisp sources,
vs. ~300 invocations of call-process.
> We could
> make the situation a tad better if we add support for the PATHEXT
> environment variable, as suggested in bug#7784, patches welcome.
I've read the bug thread. What exactly does mean to "add support for
the PATHEXT environment variable"? Making file-executable-p take it
into account? Are files in the path with one of PATHEXT extensions
runnable with call-process?
> I might be okay with adding a new function, shell-executable-find,
> say. But we must first define what that means, exactly, and whether
> it's feasible to implement something like that with reasonable effort
> and complexity.
Yeah, no rush.
> Meanwhile, just set up trivial batch file wrappers for your shell
> scripts, and Bob's your uncle.
Sure. My shell scripts weren't the problem, anyhow. I know how to work
around the issue.
I stumbled upon this because I was trying to understand failures in
vc-tests.el on Windows, and the reason is that it calls call-process
to run some shell scripts, like ci. I'd like to fix that and run the
tests, but I haven't really stared at it long enough to know if
there's any non-ugly fix.