Skip to content

Commit 626b0d2

Browse files
committed
add definition of __dirname to processHandler.ts
1 parent 4125ea4 commit 626b0d2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

i18n/initializers/processHandler.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import path from "path";
22
import { saveSummaryLog } from "../controllers/loggers";
33
import fs from "fs";
4+
import { fileURLToPath } from "url";
5+
import { dirname } from "path";
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = dirname(__filename);
49

510
export async function setupCleanupHandlers(
611
xmlFiles: string[],
@@ -52,4 +57,4 @@ export async function setupCleanupHandlers(
5257
await saveSummaryLog(xmlFiles, failures, translateNum, failureCount, successCount);
5358
process.exit(1);
5459
});
55-
}
60+
}

0 commit comments

Comments
 (0)