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. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
76327613af
commit
a4fd9e5e6d
@ -8,6 +8,9 @@ if (process.config.variables.node_without_node_options)
|
||||
const assert = require('assert');
|
||||
const exec = require('child_process').execFile;
|
||||
|
||||
common.refreshTmpDir();
|
||||
process.chdir(common.tmpDir);
|
||||
|
||||
disallow('--version');
|
||||
disallow('-v');
|
||||
disallow('--help');
|
||||
|
Loading…
x
Reference in New Issue
Block a user