-
Notifications
You must be signed in to change notification settings - Fork 26
[BUG] Windows: MinGW/Git Bash/Etc. use PATH
env var instead of Path
like cmd does.
#142
Comments
FWIW, I just tried reverting to builder v2.10.1 and that version seems to work with the tasks I'm actually trying to execute, in the git-bash / cygwin on windows 10 environment. |
A fix for this would be nice. Builder is not usable on Windows (Windows 7 in my case). As @rhbecker says, a number of tests fail on Windows. |
Can folks give me examples of real CLI commands that are failing? (The tests are a bit hacked-up / mocked-out). I've now got a win7 VM and will try and dig into this today and next week... |
Weird. All of |
OK, reproduced in git-bash. It reproduces on CLI too. For scripts: "echo": "echo %m%",
"bounce": "node bin\\builder.js run echo", Internal spawn of an executable
|
Haha, it's cuh-razy time here. The narrow bug is a matter of "where is PATH in the OS shell?". A missing path is why the location of
The current logic detects "is Windows?" and uses |
PATH
env var instead of Path
like cmd does.
I see the above error with the following setup:
These same issues do not occur via cmd.
If you have such an environment, you can repro via
npm run builder:check
, which yields ...So far, I have no explanation - only observations ...
All 11 failing tests call an npm script defined to include ...
"node test/server/fixtures/echo.js ..."
... but there are 4 tests that pass with the same script.
The difference is that the 11 failing ones invoke the script via
run
orconcurrent
, while the 4 passing ones invoke withenvs
.Don't pass:
run({argv: ["node", "builder", "run", "echo", ...]}, ...});
run({argv: ["node", "builder", "concurrent", "echo", ...]}, ...});
Pass:
run({argv: ["node", "builder", "envs", "echo", ...]}, ...});
So, you might think any script invoked via
run
that callsnode whatever
might fail, but that is not the case. The"runs with --setup"
test passes. It defines an npm script ..."bar": "node test/server/fixtures/repeat-script.js 5 BAR_TASK >> stdout.log"
... which it calls via ...
run({argv: ["node", "builder", "run", "bar", "--setup=setup"]}, ...});
The text was updated successfully, but these errors were encountered: