Skip to content

Commit b5ce452

Browse files
committed
tools: adjust script for use with 14.x
find-inactive-collaborators.mjs works fine with Node.js 16.x, but GitHub Actions currently use 14.x by default. This PR makes a small adjustment so that it works with 14.x. (14.x does not accept URL objects as paramemters for the `cwd` option in `spawn()`.)
1 parent a518e4b commit b5ce452

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/find-inactive-collaborators.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const SINCE = process.argv[2] || '6 months ago';
1212

1313
async function runGitCommand(cmd, mapFn) {
1414
const childProcess = cp.spawn('/bin/sh', ['-c', cmd], {
15-
cwd: new URL('..', import.meta.url),
15+
// TODO: remove pathname after https://github.com/nodejs/node/pull/38862 is backported to v14.x.
16+
cwd: new URL('..', import.meta.url).pathname,
1617
encoding: 'utf8',
1718
stdio: ['inherit', 'pipe', 'inherit'],
1819
});

0 commit comments

Comments
 (0)