Skip to content

Commit 7814669

Browse files
richardlauaduh95
authored andcommitted
tools: fix c-ares updater script for Node.js 18
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>
1 parent d4e7926 commit 7814669

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/dep_updaters/update-c-ares.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// Synchronize the sources for our c-ares gyp file from c-ares' Makefiles.
22
import { readFileSync, writeFileSync } from 'node:fs';
33
import { join } from 'node:path';
4+
import { fileURLToPath } from 'node:url';
45

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

89
// Extract list of sources from the gyp file.

0 commit comments

Comments
 (0)