mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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: https://github.com/nodejs/node/pull/55717 Refs: https://github.com/nodejs/node/pull/55445 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
6f12f1e500
commit
e0145b4c38
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user