Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
child_process: kHideConsoleWindows for spawnSync
kHideConsoleWindows should hide console windows for
execSync and spawnSync calls as well. This fix adds on
to #39712.
  • Loading branch information
rzhao271 committed Jan 5, 2022
commit 92ea0d3a80e0f043f9b3ac2cf50f479eaf935a63
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