Skip to content

Commit

Permalink
tools: adjust script for use with 14.x
Browse files Browse the repository at this point in the history
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()`.)
  • Loading branch information
Trott committed Jul 12, 2021
1 parent a518e4b commit b5ce452
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/find-inactive-collaborators.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const SINCE = process.argv[2] || '6 months ago';

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

0 comments on commit b5ce452

Please sign in to comment.