Closed ni-fgenois closed 1 year ago
hi @ni-fgenois, thanks for the feedback and sorry for the delayed response.
My knowledge of windows is not strong, but I understand that normally the shell uses PATHEXT when searching the path for executables, but apparently the same thing doesn't work reliably when the cmd is run as a subprocess with Popen?
I guess the desirable behaviour would be if on windows it first tried to resolve the executable from the path using shutil.where
? Would that work? Is that a good idea? Is there something else going on here that might contribute to the behaviour not being as expected?
Happy to take advice on this one.
Hi @ni-fgenois,
I think I might have a fix for this in form of https://github.com/nat-n/poethepoet/commit/98d8a85dd1dccdc8054510037cc032e0899b6dc8, but I don't have a windows machine handy to test it.
Could you help me by checking if it works as expected now with the latest pre-release? https://pypi.org/project/poethepoet/0.18.2b2/
Really sorry for the late reply, I was off on sabbatical for a few months :S
I can confirm that @ameily 's fix solves my issue too, but unfortunately not the original fix.
@nat-n could you ship a new version with the aforementioned fix?
Thanks a lot for looking into this!
First of all, thank you for maintaining this really cool tool!
Current behavior
On Windows, the following task fails to run as it can't find
npm.cmd
:Specifying
{cmd="npm.cmd install"}
works fine, and{cmd="node --help"}
also works asnode.exe
is in the path.Expected behavior
poethepoet
should call*.cmd
files as if they were regular executables.Workaround
Use a
switch
command