child_process: kHideConsoleWindows for spawnSync

kHideConsoleWindows should hide console windows for
execSync and spawnSync calls as well. This fix adds on
to https://github.com/nodejs/node/pull/39712.

PR-URL: https://github.com/nodejs/node/pull/41412
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Raymond Zhao authored and GitHub committed 2022-02-11 17:30:56 +00:00
1 parent 998e5acc69
commit 863d13c192
1 file changed
+3
+3
View File
@@ -810,6 +810,9 @@ Maybe<int> SyncProcessRunner::ParseOptions(Local<Value> js_value) {
if (js_win_hide->BooleanValue(isolate))
uv_process_options_.flags |= UV_PROCESS_WINDOWS_HIDE;
if (env()->hide_console_windows())
uv_process_options_.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE;
Local<Value> js_wva =
js_options->Get(context, env()->windows_verbatim_arguments_string())
.ToLocalChecked();