-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Freeze NODE_OPTIONS for SingeExecutableApplications #55573
Comments
@joyeecheung I'm happy to do this if you think it's the right thing to do. Just let me know.
|
Similar issue: nodejs/single-executable#100 |
It seems to me what you need is just 2 if the SEA configuration JSON file can be used to configure CLI flags and environment variables overrides. Then for 1 you can just generate those fields in the JSON configuration at build time? A special case that only works with NODE_OPTIONS could cause surprises when support for more generic override is added and they don't work together (as requested in nodejs/single-executable#100 and some other SEA issues). |
Sort of. I need 2 to function but also want |
If it's an environmental variable override, having overrides alone would block the NODE_OPTION coming from runtime (and if it's overridden to an empty string it would just block the runtime values without adding new ones). |
I think supporting a config like this in the SEA config might be enough for the use case: {
"env": { "NODE_OPTIONS": "--no-warnings" }
} This is probably equivalent to: {
"env": { "NODE_OPTIONS": "" },
"argv": [ "--no-warnings" ]
} |
What is the problem this feature will solve?
The
NODE_OPTIONS
environment variable allows configuration of the node process at runtime. This is inappropriate for Single Executable Applications. But the configurability provided is also something strictly desirable foe Single Executable Applications at "build" time.What is the feature you are proposing to solve the problem?
NODE_OPTIONS
environment variable into the injected blob at build-timeNODE_OPTIONS
value at runtimeWhat alternatives have you considered?
I looked at enabling individual overrides via sea-config.json as well as possibly storing the actual environment settings and reconstructing these.
However that seems to be either less configurable as well as introducing additional complexity. By going this route, we'd expose the full configurability of
NODE_OPTIONS
while at the same time not introducing any strictly new mechanisms.The text was updated successfully, but these errors were encountered: