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
Fix: Windows - wrap npm path in quotes, use shell when spawning npm #27
Conversation
Thank you very much! Hmmm, but this PR is not working on my PC.
|
Sure. I didn't think it would be that simple... It could need a check for the existence of a space in the path? I'm just guessing now though... |
I'm trying to make a test case for this. |
Just a suggestion, would it be worth using an existing cross platform spawn utility like node-cross-spawn-async |
Good idea. ... I'm confusing now....
describe("should run tasks even if npm exists at a path which includes a space:", () => {
const originalPath = process.env.PATH;
before(() => {
process.env.PATH = Path.resolve(__dirname, "../test-workspace/spaced bin/") + ";" + process.env.PATH; // eslint-disable-line
});
after(() => {
process.env.PATH = originalPath;
});
it("lib version", () =>
runAll(["test-task:append a"], {parallel: false})
.then(() => {
assert(result() === "aa");
})
);
it("command version", () =>
command(["test-task:append a"])
.then(() => {
assert(result() === "aa");
})
);
}); |
Do you have the test available for me to try? What version node are we both running? |
Thank you, I pushed it: https://github.com/mysticatea/npm-run-all/tree/fix-for-space I tried 4.3.2 and 5.7.1 |
Sorry, I pushed again. |
I confirmed to reproduce it on webpack-validator.
|
OK, I confirmed to resolve this issue with using |
@BarryThePenguin I really appreciate your works and suggestions! |
👏 No problem, happy to help. Ping me anytime |
Fixes #26