We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Wrong splitting of command attributes and it's breaking process execution.
#!/usr/bin/php <?php print_r($argv); ?>
var result = process('./run --file=test --params="add test"').death(); console.log(result.data);
Array ( [0] => ./run [1] => --file=queue [2] => --params="add [3] => aa" )
But should display:
Array ( [0] => ./run [1] => --file=queue [2] => --params=add aa )
It's not PHP problem because if you run this command directly in console it works perfectly.
https://github.com/CircleOfNice/CoreWorker/blob/master/lib/NodeProcess.js#L291 It is splitting just by space so this code
var command = './run --file=test --params="add test"'; var splittedCommand = command.split(" ");
produces array:
["./run", "--file=test", '--params="add', 'test"']
but it should produce:
["./run", "--file=test", '--params="add test"']
You can use something like this: https://www.npmjs.com/package/parse-spawn-args
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description of Feature / Expected vs Actual Behaviour
Wrong splitting of command attributes and it's breaking process execution.
Steps to reproduce
But should display:
Additional Information
It's not PHP problem because if you run this command directly in console it works perfectly.
https://github.com/CircleOfNice/CoreWorker/blob/master/lib/NodeProcess.js#L291
It is splitting just by space so this code
produces array:
but it should produce:
You can use something like this:
https://www.npmjs.com/package/parse-spawn-args
The text was updated successfully, but these errors were encountered: