From 489e1b6bcff003cb849b432788c755e5b2d7da74 Mon Sep 17 00:00:00 2001 From: Leon van Zyl Date: Sun, 30 Nov 2025 14:58:53 +0200 Subject: [PATCH] fix setup script --- scripts/setup.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/setup.ts b/scripts/setup.ts index 446cdb4..2b97dff 100644 --- a/scripts/setup.ts +++ b/scripts/setup.ts @@ -7,9 +7,12 @@ import { existsSync, copyFileSync, readFileSync } from "fs"; import { createInterface } from "readline"; import { execSync } from "child_process"; -import { join } from "path"; +import { dirname, join } from "path"; +import { fileURLToPath } from "url"; -const ROOT_DIR = join(import.meta.dirname, ".."); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const ROOT_DIR = join(__dirname, ".."); const ENV_EXAMPLE = join(ROOT_DIR, "env.example"); const ENV_FILE = join(ROOT_DIR, ".env");