Skip to content

Commit

Permalink
tools: fix c-ares updater script for Node.js 18
Browse files Browse the repository at this point in the history
GitHub Actions is by default running the tools updater workflow
with Node.js 18. Avoid use of `import.meta.dirname`, which wasn't
backported to Node.js 18.

PR-URL: #55717
Refs: #55445
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
richardlau authored and ruyadorno committed Nov 27, 2024
1 parent 0010d1a commit 38e5894
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/dep_updaters/update-c-ares.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Synchronize the sources for our c-ares gyp file from c-ares' Makefiles.
import { readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { fileURLToPath } from 'node:url';

const srcroot = join(import.meta.dirname, '..', '..');
const srcroot = fileURLToPath(new URL('../../', import.meta.url));
const options = { encoding: 'utf8' };

// Extract list of sources from the gyp file.
Expand Down

0 comments on commit 38e5894

Please sign in to comment.