Fix Bifrost bridge runtime and fixture env isolation
This commit is contained in:
parent
0c53f70e25
commit
ba01b78d68
7 changed files with 147 additions and 15 deletions
|
|
@ -17,8 +17,7 @@ const defaultPersonaAvatarUrl =
|
|||
"https://raw.githubusercontent.com/GameCult/Bifrost/main/src/Bifrost.Web/wwwroot/img/bifrost-profile.png";
|
||||
|
||||
async function main() {
|
||||
loadLocalEnv(resolve(bifrostRoot, ".env"));
|
||||
loadLocalEnv(resolve(defaultProjectsRoot, "VoidBot", ".env"));
|
||||
loadBifrostLocalEnv();
|
||||
const [command, ...rawArgs] = process.argv.slice(2);
|
||||
const options = parseArgs(rawArgs);
|
||||
|
||||
|
|
@ -43,6 +42,15 @@ async function main() {
|
|||
}
|
||||
}
|
||||
|
||||
function loadBifrostLocalEnv() {
|
||||
if (process.env.BIFROST_SKIP_LOCAL_ENV === "true") {
|
||||
return;
|
||||
}
|
||||
|
||||
loadLocalEnv(resolve(bifrostRoot, ".env"));
|
||||
loadLocalEnv(resolve(defaultProjectsRoot, "VoidBot", ".env"));
|
||||
}
|
||||
|
||||
async function dispatchQueuedRequests(options) {
|
||||
const max = parseInteger(options.max ?? "1", "max");
|
||||
const statusDir = resolveOptionPath(options["status-dir"] ?? defaultStatusDir);
|
||||
|
|
|
|||
Loading…
Reference in a new issue