Skip to content

Commit

Permalink
Set flags for node::Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Jan 6, 2025
1 parent 3d9d69f commit 2648a7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion node
7 changes: 6 additions & 1 deletion src/yode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,16 @@ int Start(int argc, char* argv[]) {
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = node::NewContext(isolate);
v8::Context::Scope context_scope(context);
node::EnvironmentFlags::Flags env_flags =
static_cast<node::EnvironmentFlags::Flags>(
node::EnvironmentFlags::kDefaultFlags |
node::EnvironmentFlags::kHideConsoleWindows);
node::DeleteFnPtr<node::Environment, node::FreeEnvironment> env(
node::CreateEnvironment(isolate_data.get(),
context,
init->args(),
init->exec_args()));
init->exec_args(),
env_flags));

// Check if this process should run GUI event loop.
const char* run_as_node = getenv("YODE_RUN_AS_NODE");
Expand Down

0 comments on commit 2648a7f

Please sign in to comment.