You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export function getDevNodeOptions() {
const { NODE_OPTIONS } = process.env
const enableSourceMapsOption = '--enable-source-maps'
if (!NODE_OPTIONS) {
return `NODE_OPTIONS=${enableSourceMapsOption}`
}
if (NODE_OPTIONS.includes(enableSourceMapsOption)) {
return NODE_OPTIONS
}
return `${NODE_OPTIONS} ${enableSourceMapsOption}`
}
If an .env file with NODE_OPTIONS is provided, we get an error:
api | '--enable-source-maps' is not recognized as an internal or external command,
api | operable program or batch file.
api | node:events:495
api | throw er; // Unhandled 'error' event
api | ^
At first glance, it looks to me like NODE_OPTIONS= is not appropriately inserted in front of the combined options.
How do we reproduce the bug?
No response
What's your environment? (If it applies)
No response
Are you interested in working on this?
I'm interested in working on this
The text was updated successfully, but these errors were encountered:
Fixes#9733.
- don't rely on the function `getDevNodeOptions` to return the whole env
var string (`NODE_OPTIONS="..."`); just return the value of
`NODE_OPTIONS`
- fix the quoting issue #9733 was specifically about where the env var
string would be inserted as `NODE_OPTIONS=--inspect
--enable-source-maps` causing spawn to think `--enable-source-maps` was
meant for something else
- fix the test; the mock value for `NODE_OPTIONS` was incorrect
resulting in a false positive
Fixes#9733.
- don't rely on the function `getDevNodeOptions` to return the whole env
var string (`NODE_OPTIONS="..."`); just return the value of
`NODE_OPTIONS`
- fix the quoting issue #9733 was specifically about where the env var
string would be inserted as `NODE_OPTIONS=--inspect
--enable-source-maps` causing spawn to think `--enable-source-maps` was
meant for something else
- fix the test; the mock value for `NODE_OPTIONS` was incorrect
resulting in a false positive
What's not working?
The code in redwood is:
If an .env file with NODE_OPTIONS is provided, we get an error:
At first glance, it looks to me like
NODE_OPTIONS=
is not appropriately inserted in front of the combined options.How do we reproduce the bug?
No response
What's your environment? (If it applies)
No response
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: