fix: cli: user command now uses the same app env setup as run

This commit is contained in:
dswbx
2025-04-08 11:22:10 +02:00
parent 7e1757b7f4
commit a80a731498
4 changed files with 36 additions and 18 deletions

View File

@@ -3,6 +3,14 @@ import { readFile } from "node:fs/promises";
import path from "node:path";
import url from "node:url";
export function isBun(): boolean {
try {
return typeof Bun !== "undefined";
} catch (e) {
return false;
}
}
export function getRootPath() {
const _path = path.dirname(url.fileURLToPath(import.meta.url));
// because of "src", local needs one more level up