Skip to content

Commit

Permalink
docs: note enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Apr 9, 2024
1 parent 33a72bc commit f0a499e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/api/environment-variables.md
Expand Up @@ -51,7 +51,7 @@ Unsupported options are:
--http-parser
```

The [`nodeOptions` fuse](../tutorial/fuses.md#L27) need to be enabled in order to use this variable.
If the [`nodeOptions` fuse](../tutorial/fuses.md#L27) is disabled, `NODE_OPTIONS` will be ignored.

### `NODE_EXTRA_CA_CERTS`

Expand All @@ -61,7 +61,7 @@ See [Node.js cli documentation](https://github.com/nodejs/node/blob/main/doc/api
export NODE_EXTRA_CA_CERTS=/path/to/cert.pem
```

The [`nodeOptions` fuse](../tutorial/fuses.md#L27) need to be enabled in order to use this variable.
If the [`nodeOptions` fuse](../tutorial/fuses.md#L27) is disabled, `NODE_OPTIONS` will be ignored.

### `GOOGLE_API_KEY`

Expand Down Expand Up @@ -104,7 +104,7 @@ you would when running the normal Node.js executable, with the exception of the
These flags are disabled owing to the fact that Electron uses BoringSSL instead of OpenSSL when building Node.js'
`crypto` module, and so will not work as designed.

The [`runAsNode` fuse](../tutorial/fuses.md#L13) need to be enabled in order to use this variable.
If the [`runAsNode` fuse](../tutorial/fuses.md#L13) is disabled, `ELECTRON_RUN_AS_NODE` will be ignored.

### `ELECTRON_NO_ATTACH_CONSOLE` _Windows_

Expand Down
5 changes: 2 additions & 3 deletions shell/common/node_bindings.cc
Expand Up @@ -355,8 +355,7 @@ void SetNodeOptions(base::Environment* env) {

if (env->HasVar("NODE_EXTRA_CA_CERTS")) {
if (!electron::fuses::IsNodeOptionsEnabled()) {
LOG(ERROR) << "The NODE_OPTIONS fuse must be enabled in order to use "
"NODE_EXTRA_CA_CERTS";
LOG(WARNING) << "NODE_OPTIONS ignored due to disabled nodeOptions fuse.";
env->UnSetVar("NODE_EXTRA_CA_CERTS");
}
}
Expand Down Expand Up @@ -391,7 +390,7 @@ void SetNodeOptions(base::Environment* env) {
// overwrite new NODE_OPTIONS without unsupported variables
env->SetVar("NODE_OPTIONS", options);
} else {
LOG(ERROR) << "NODE_OPTIONS have been disabled in this app";
LOG(WARNING) << "NODE_OPTIONS ignored due to disabled nodeOptions fuse.";
env->UnSetVar("NODE_OPTIONS");
}
}
Expand Down

0 comments on commit f0a499e

Please sign in to comment.