Skip to content

Commit

Permalink
test: chdir before running test-cli-node-options
Browse files Browse the repository at this point in the history
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: #12660
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
danbev committed Apr 28, 2017
1 parent 7632761 commit a4fd9e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-cli-node-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit a4fd9e5

Please sign in to comment.