Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Explicitly clear NODE_OPTIONS when running the CLI, so Node doesn't t…
Browse files Browse the repository at this point in the history
…ry to start a debug session
  • Loading branch information
JamesMessinger committed Jul 19, 2020
1 parent 6603489 commit 4937e91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"stopOnEntry": false,
"args": [
"--debug",
"bundle",
"--type=yaml",
"--wrap=80",
"test/files/valid/single-file/api.yaml"
"validate",
"test/files/invalid/internal-ref/api.yaml"
],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
Expand All @@ -21,18 +19,23 @@
"--nolazy"
],
"env": {
"NODE_ENV": "development"
"NODE_ENV": "development",
"NODE_OPTIONS": ""
},
"console": "internalConsole",
"sourceMaps": false
},

{
"name": "Run tests",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}\\node_modules\\mocha\\bin\\_mocha",
"stopOnEntry": false,
"args": ["--timeout=600000"],
"args": [
"--timeout=600000",
"--retries=0"
],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ beforeEach(done => {
exports.run = function (args) {
// Run the CLI
args = [cliPath].concat(Array.prototype.slice.call(arguments));
let output = spawnSync("node", args);
let output = spawnSync("node", args, { env: { ...process.env, NODE_OPTIONS: "" }});

// Normalize the output
output.stdout = replacePaths(output.stdout.toString());
Expand Down

0 comments on commit 4937e91

Please sign in to comment.