Skip to content

Commit 6e7dfb1

Browse files
gibfahnMylesBorins
authored andcommitted
test: fix temp-dir option in tools/test.py
If a temp-dir is specified and already exists, the NODE_TEST_DIR environment variable will never be set. This fixes that. PR-URL: #10723 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 9abde3a commit 6e7dfb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,9 +1672,9 @@ def Main():
16721672

16731673
tempdir = os.environ.get('NODE_TEST_DIR') or options.temp_dir
16741674
if tempdir:
1675+
os.environ['NODE_TEST_DIR'] = tempdir
16751676
try:
16761677
os.makedirs(tempdir)
1677-
os.environ['NODE_TEST_DIR'] = tempdir
16781678
except OSError as exception:
16791679
if exception.errno != errno.EEXIST:
16801680
print "Could not create the temporary directory", options.temp_dir

0 commit comments

Comments
 (0)