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.
  • Loading branch information
richardlau committed Nov 4, 2024
1 parent bdc2662 commit ba3ce30
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 ba3ce30

Please sign in to comment.