Skip to content

Commit ba830f0

Browse files
danbevMylesBorins
authored andcommitted
test: chdir before running test-cli-node-options
When test-cli-node-options is run it uses the --trace-events-enabled option which generates a file named node_trace.1.log. This commit changes the working directory to the test tmp directory to avoid this file being created in the project root. Backport-PR-URL: #12677 PR-URL: #12660 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 16f8f9b commit ba830f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/parallel/test-cli-node-options.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ if (process.config.variables.node_without_node_options)
88
const assert = require('assert');
99
const exec = require('child_process').execFile;
1010

11+
common.refreshTmpDir();
12+
process.chdir(common.tmpDir);
13+
1114
disallow('--version');
1215
disallow('-v');
1316
disallow('--help');

0 commit comments

Comments
 (0)