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 <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
richardlau authored and aduh95 committed Nov 16, 2024
1 parent d4e7926 commit 7814669
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 7814669

Please sign in to comment.