mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-23 09:42:53 +02:00
Fix compile race conditions
This commit is contained in:
@@ -285,10 +285,8 @@ export async function determineAllPossibilitiesForTabCompletion(
|
||||
return processFilepath(script.filename) === fn || script.filename === "/" + fn;
|
||||
});
|
||||
if (!script) return; // Doesn't exist.
|
||||
if (!script.module) {
|
||||
await compile(p, script, currServ.scripts);
|
||||
}
|
||||
const loadedModule = await script.module;
|
||||
//Will return the already compiled module if recompilation not needed.
|
||||
const loadedModule = await compile(p, script, currServ.scripts);
|
||||
if (!loadedModule || !loadedModule.autocomplete) return; // Doesn't have an autocomplete function.
|
||||
|
||||
const runArgs = { "--tail": Boolean, "-t": Number };
|
||||
|
||||
Reference in New Issue
Block a user