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;
|
return processFilepath(script.filename) === fn || script.filename === "/" + fn;
|
||||||
});
|
});
|
||||||
if (!script) return; // Doesn't exist.
|
if (!script) return; // Doesn't exist.
|
||||||
//Will return the already compiled module if recompilation not needed.
|
let loadedModule;
|
||||||
const loadedModule = await compile(script, currServ.scripts);
|
try {
|
||||||
|
//Will return the already compiled module if recompilation not needed.
|
||||||
|
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.
|
if (!loadedModule || !loadedModule.autocomplete) return; // Doesn't have an autocomplete function.
|
||||||
|
|
||||||
const runArgs = { "--tail": Boolean, "-t": Number };
|
const runArgs = { "--tail": Boolean, "-t": Number };
|
||||||
|
Loading…
Reference in New Issue
Block a user