-
Notifications
You must be signed in to change notification settings - Fork 70
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
change the way to use spawn #142
Conversation
If the platform is win32 and path contains space, spawn will not execute correctly. Relate Post: nodejs/node-v0.x-archive#25895 Relate Issue: #140
Hi, is there any one to check about this? Or should I give some additional information? |
Not many people use Windows.
|
var phantom = spawn(options.path, args); | ||
var phantom; | ||
// if platform is win32 and the path contains space, using some hacks for the spawn method | ||
if (process.platform == 'win32' && options.path.indexOf(' ') >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, execution method on win32 should not depend on path content.
I don't care much about win, but don't have objections to support it better if someone provides good & complete solution.
|
@puzrin yes, I agree about what you said. This spawn way seems weird and you want to make the code easy enough to be understood. But the issue really exist on wnidows platform, which is mentioned in this post. Currently I have no idea about configuring CI to run tests on win platform. So I understand the objections to merge. Maybe I'll create another PR after I find a more elegant solution. @baudehlo what you said is true to some extend. But I dont think it's a right way to refuse the PR. We are all trying to make this tool better and better right? |
@jdneo see https://github.com/eslint/eslint/blob/master/appveyor.yml as example. There is nothing difficult.
Any code means additional maintenance cost (developpers time) in future. Bad code -> high cost, good code -> low cost. If you RP a clear code with verified config for appveyour, i see no problems to accept it. |
@puzrin thanks, I'll take a look. |
@jdneo you misunderstood. I meant not many people can check it because they don't program this stuff on Windows. I certainly can't test it. |
If the platform is win32 and path contains space, spawn will not execute correctly.
For example, if the path of slimerjs is C:\Program Files\slimerjs\sliemrjs.bat. The spawn will treat C:\Program as the command and Files\slimerjs\sliemrjs.bat... as args. The way to solve it is to use \S and \C args of the cmd, which is methioned by @progmars of the following post.
Relate Post: nodejs/node-v0.x-archive#25895
Relate Issue: #140