Skip to content

Commit 5844565

Browse files
richardlauruyadorno
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 940d22f commit 5844565

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tools/dep_updaters/update-c-ares.mjs‎

Lines changed: 2 additions & 1 deletion
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-
constsrcroot=join(import.meta.dirname,'..','..');
6+
constsrcroot=fileURLToPath(newURL('../../',import.meta.url));
67
constoptions={encoding: 'utf8'};
78

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

0 commit comments

Comments
 (0)