-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Use the /q
flag with cmd.exe
in child_process.spawn()
#27120
Comments
That seems reasonable. The question is: how likely is it someone files a feature request to turn off that |
Not being a Windows user, I think the answer is "very likely" because we can't make everyone happy all of the time. I think it's time to start letting flags be passed in. |
I believe adding a default running this code: const { execSync } = require('child_process')
const ret = execSync('t.cmd', { encoding: 'utf8' })
console.log(ret) for the following echo hello begets:
while for this @echo off
echo hello begets:
|
The comment from @refack makes sense to me. I.e. Windows users might not expect this, and this should be done inside the Batch file instead of outside (in the shell). One could argue though that the existence of the Granted this is not the default behavior of |
As @cjihrig commented, instead of changing the default, we could open it up for configuration, or as a new argument. |
yes, I think we can add a new configuration with the default option and I'm making this thing |
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment. For more information on how the project manages feature requests, please consult the feature request management document. |
There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment. For more information on how the project manages feature requests, please consult the feature request management document. |
Is your feature request related to a problem? Please describe.
child_process.spawn()
withshell: true
on Windows callscmd.exe /d /s /c
.This makes
childProcess.stdout
include the prompt and command with Batch files.Describe the solution you'd like
Add the
/q
flag.Alternatives
Adding
@echo off
to Batch files.The text was updated successfully, but these errors were encountered: