mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 21:25:47 +01:00
silent fail for tabcompletion compile error
This commit is contained in:
parent
7d37736058
commit
83c62bbc63
@ -285,8 +285,14 @@ export async function determineAllPossibilitiesForTabCompletion(
|
||||
return processFilepath(script.filename) === fn || script.filename === "/" + fn;
|
||||
});
|
||||
if (!script) return; // Doesn't exist.
|
||||
let loadedModule;
|
||||
try {
|
||||
//Will return the already compiled module if recompilation not needed.
|
||||
const loadedModule = await compile(script, currServ.scripts);
|
||||
loadedModule = await compile(script, currServ.scripts);
|
||||
} catch (e) {
|
||||
//fail silently if the script fails to compile (e.g. syntax error)
|
||||
return;
|
||||
}
|
||||
if (!loadedModule || !loadedModule.autocomplete) return; // Doesn't have an autocomplete function.
|
||||
|
||||
const runArgs = { "--tail": Boolean, "-t": Number };
|
||||
|
Loading…
Reference in New Issue
Block a user