From 52d56c387dc11a84efa6ce381a2fd8a3660f2c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Wed, 23 Oct 2024 00:31:13 +0200 Subject: [PATCH] Fix current path in compiled program --- config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.ts b/config.ts index 22b84ac..630cf6c 100644 --- a/config.ts +++ b/config.ts @@ -2,7 +2,7 @@ import { load } from "@std/dotenv"; import { parse } from "jsr:@std/yaml"; import { log } from "./log.ts"; -const dirname = new URL(".", import.meta.url).pathname; +const dirname = Deno.cwd(); await load({ envPath: `${dirname}/.env`, export: true }); let staticUsers: { [key: string]: string } = {};