diff options
author | Cheng Zhao <zcbenz@gmail.com> | 2021-08-09 14:02:50 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-08-17 20:17:16 +0300 |
commit | fae352a0f5b37e2b4a1b0c636cc786b4a3e6e496 (patch) | |
tree | 477c757b29b3bbeb295db77964bf5d3a8cb9cc75 /src/process_wrap.cc | |
parent | f42d7a4552cdf3604833c61cf1d7923b9602833d (diff) |
build: add option to hide console window
Adds a Environment flag to allow embedders to set CREATE_NO_WINDOW
property when spawning processes, which is useful for GUI programs
that do not want to show console windows when running terminal
commands.
PR-URL: https://github.com/nodejs/node/pull/39712
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/process_wrap.cc')
-rw-r--r-- | src/process_wrap.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/process_wrap.cc b/src/process_wrap.cc index 45920c2603b..679429286b8 100644 --- a/src/process_wrap.cc +++ b/src/process_wrap.cc @@ -238,6 +238,10 @@ class ProcessWrap : public HandleWrap { options.flags |= UV_PROCESS_WINDOWS_HIDE; } + if (env->hide_console_windows()) { + options.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE; + } + // options.windows_verbatim_arguments Local<Value> wva_v = js_options->Get(context, env->windows_verbatim_arguments_string()) |