Skip to content

Commit 93877c8

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 0f3677d commit 93877c8

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
@@ -1644,9 +1644,9 @@ def Main():
16441644

16451645
tempdir = os.environ.get('NODE_TEST_DIR') or options.temp_dir
16461646
if tempdir:
1647+
os.environ['NODE_TEST_DIR'] = tempdir
16471648
try:
16481649
os.makedirs(tempdir)
1649-
os.environ['NODE_TEST_DIR'] = tempdir
16501650
except OSError as exception:
16511651
if exception.errno != errno.EEXIST:
16521652
print "Could not create the temporary directory", options.temp_dir

0 commit comments

Comments
 (0)