Skip to content

Commit 1c404bd

Browse files
rzhao271bengl
authored andcommitted
child_process: kHideConsoleWindows for spawnSync
kHideConsoleWindows should hide console windows for execSync and spawnSync calls as well. This fix adds on to #39712. PR-URL: #41412 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5ede458 commit 1c404bd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/spawn_sync.cc

+3
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,9 @@ Maybe<int> SyncProcessRunner::ParseOptions(Local<Value> js_value) {
810810
if (js_win_hide->BooleanValue(isolate))
811811
uv_process_options_.flags |= UV_PROCESS_WINDOWS_HIDE;
812812

813+
if (env()->hide_console_windows())
814+
uv_process_options_.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE;
815+
813816
Local<Value> js_wva =
814817
js_options->Get(context, env()->windows_verbatim_arguments_string())
815818
.ToLocalChecked();

0 commit comments

Comments
 (0)