mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 19:14:32 +02:00
properly fix leading '/' script bug (#296)
This commit is contained in:
@@ -421,9 +421,6 @@ export function runScriptFromScript(
|
||||
return 0;
|
||||
}
|
||||
|
||||
//prevent leading / from causing a bug
|
||||
if (scriptname.startsWith("/")) scriptname = scriptname.slice(1);
|
||||
|
||||
if (typeof scriptname !== "string" || !Array.isArray(args)) {
|
||||
workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);
|
||||
console.error(`runScriptFromScript() failed due to invalid arguments`);
|
||||
|
||||
Reference in New Issue
Block a user