-
Notifications
You must be signed in to change notification settings - Fork 82
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
createProcess function is can't exec a *.cmd or *.bat file #140
Comments
I don't understand why the first example from the command line itself worked. If Similarly, does running |
There is the env var passed in to
Although it can be executed on the command line, it can not be executed on the ※ |
OK, so narrowing this down further, it seems like the problem is: given a plain executable name like |
Yes, it is accurate. |
I've looked into the source code on Windows. Ultimately, we're passing the command line to the
(From MSDN on CreateProcessA.) I don't see which screen shot demonstrates the claim about the CWD path. I will note that on POSIX systems, that's the expected behavior. However, from the same MSDN docs, it should work as you expect on Windows:
|
I'm going to guess in all of these cases, if you instead use |
Thank you! |
You're welcome, no problem |
-- Sorry, I'm poor English.
createProcess function is can't exec a *.cmd or *.bat file.
I can exec
foo
command whenfoo.cmd
is placed of system environment variable paths. However, createProcess function is can't execfoo
. (foo.cmd
too)It catch an error that error message is
does not exist (No such file or directory)
.reproduction screenshot
about this problem
This is not usually a problem. However, It may be a problem. For example, some of the commands built by NodeJS (with NPM) are wrapped with .cmd file.
Concretely, I'm facing this problem at here.
The text was updated successfully, but these errors were encountered: