Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.

Commit 18824c3

Browse files
Add more __dirname definitions
1 parent 392c97b commit 18824c3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

build-scripts/add-os-restrictions.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424

2525
import fs from 'node:fs';
2626
import path from 'node:path';
27+
import {fileURLToPath, URL} from 'node:url';
28+
29+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
2730

2831
// Maps of the os marketing name to the platform name used in package.json os restriction fields
2932
const osRestrictions = new Map([

build-scripts/graal.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
*/
2323

2424
import path from 'node:path';
25+
import {fileURLToPath, URL} from 'node:url';
2526
import runCommand from './run-command.js';
2627

28+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
29+
2730
// This script should catch and handle all rejected promises.
2831
// If it ever fails to do so, report that and exit immediately.
2932
process.on('unhandledRejection', error => {

0 commit comments

Comments
 (0)