mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix tool path in test-doctool-versions.js
Path to the versions tool tested by test-doctool-versions.js would be incorrect if the test temporary directory was redirected (e.g. via NODE_TEST_DIR) outside of `test/`. Signed-off-by: Richard Lau <riclau@uk.ibm.com> PR-URL: https://github.com/nodejs/node/pull/32645 Refs: https://github.com/nodejs/node/pull/32518 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
committed by
Anna Henningsen
parent
8c0a17ae28
commit
0ddfd0fc12
@@ -9,7 +9,7 @@ const tmpdir = require('../common/tmpdir');
|
||||
const util = require('util');
|
||||
|
||||
const debuglog = util.debuglog('test');
|
||||
const versionsTool = path.join('../../tools/doc/versions.js');
|
||||
const versionsTool = path.resolve(__dirname, '../../tools/doc/versions.js');
|
||||
|
||||
// At the time of writing these are the minimum expected versions.
|
||||
// New versions of Node.js do not have to be explicitly added here.
|
||||
@@ -29,7 +29,7 @@ const expected = [
|
||||
|
||||
tmpdir.refresh();
|
||||
const versionsFile = path.join(tmpdir.path, 'versions.json');
|
||||
debuglog(versionsFile);
|
||||
debuglog(`${process.execPath} ${versionsTool} ${versionsFile}`);
|
||||
const opts = { cwd: tmpdir.path, encoding: 'utf8' };
|
||||
const cp = spawnSync(process.execPath, [ versionsTool, versionsFile ], opts);
|
||||
debuglog(cp.stderr);
|
||||
|
||||
Reference in New Issue
Block a user