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

Commit 392c97b

Browse files
Define __dirname for build image script
1 parent 8130c76 commit 392c97b

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

packages/google-closure-compiler-linux-arm64/build-image.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222

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

29+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
2830
const dimWhite = (text) => chalk.dim(chalk.white(text));
2931

3032
if (fs.existsSync(path.resolve(__dirname, 'compiler'))) {

packages/google-closure-compiler-linux/build-image.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222

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

29+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
2830
const dimWhite = (text) => chalk.dim(chalk.white(text));
2931

3032
if (fs.existsSync(path.resolve(__dirname, 'compiler'))) {

packages/google-closure-compiler-macos/build-image.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222

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

29+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
2830
const dimWhite = (text) => chalk.dim(chalk.white(text));
2931

3032
if (fs.existsSync(path.resolve(__dirname, 'compiler'))) {

packages/google-closure-compiler-windows/build-image.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222

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

29+
const __dirname = fileURLToPath(new URL('.', import.meta.url));
2830
const dimWhite = (text) => chalk.dim(chalk.white(text));
2931

3032
// The windows sdk set env command messes with colors, so reset the console back to default

0 commit comments

Comments
 (0)