Skip to content

Commit

Permalink
child_process: kHideConsoleWindows for spawnSync
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rzhao271 authored and bengl committed Feb 21, 2022
1 parent 5ede458 commit 1c404bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/spawn_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1c404bd

Please sign in to comment.