-
To illustrate the question, I have ninja.exe from here: mingw-w64-x86_64-ninja-1.12.1-1-any.pkg.tar.zst And I've created an empty file 'aaa' and the file build.ninja with the content:
If I go to cmd.exe prompt I get:
but if I start the same ninja.exe executable from git-bash.exe then the same input and the same binary both work:
How exactly, that is, by which mechanism exactly, does that ninja.exe know to invoke something else and not that CreateProcess like from cmd.exe which failed? I'm asking because I also have busybox.exe from which I can also start the posix shell from the cmd.exe, and I would like the same binary to also "know" to use that shell and not CreateProcess which fails:
What I'm sure is that there's no only one hardcoded way in the binary as the same binary starts the process differently when invoked from git-bash.exe and when invoked from cmd.exe or busybox sh invoked from cmd.exe. Is there some environment variable to set that would allow running that specific ninja.exe "correctly" from busybox.exe started from cmd.exe? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Because, cmd does not have
That environment should have symlinks of some programs like mv, cp etc. to busybox. See Alpine Linux or Void Linux (musl) /bin directory as example. |
Beta Was this translation helpful? Give feedback.
Because, cmd does not have
mv
command but cygwin, msys2, git-for-windows environments have.That environment should have symlinks of some programs like mv, cp etc. to busybox. See Alpine Linux or Void Linux (musl) /bin directory as example.