inital commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
|
||||
export function resolveRuntimeRoot(cwd: string = process.cwd()): string {
|
||||
const explicitRoot = process.env.OVERLORD_ROOT?.trim();
|
||||
if (explicitRoot) {
|
||||
return path.resolve(explicitRoot);
|
||||
}
|
||||
|
||||
if (fs.existsSync(path.join(cwd, "Overlord-Client"))) {
|
||||
return cwd;
|
||||
}
|
||||
|
||||
return path.resolve(cwd, "..");
|
||||
}
|
||||
Reference in New Issue
Block a user