mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-22 06:02:26 +01:00
wget() Netscript function always returns a Promise
This commit is contained in:
parent
eb1a7cf8a0
commit
0e7b6599bb
@ -2265,7 +2265,7 @@ function NetscriptFunctions(workerScript) {
|
|||||||
if (workerScript.checkingRam) { return 0; }
|
if (workerScript.checkingRam) { return 0; }
|
||||||
if (!isScriptFilename(target) && !target.endsWith(".txt")) {
|
if (!isScriptFilename(target) && !target.endsWith(".txt")) {
|
||||||
workerSript.log(`ERROR: wget() failed because of an invalid target file: ${target}. Target file must be a script or text file`);
|
workerSript.log(`ERROR: wget() failed because of an invalid target file: ${target}. Target file must be a script or text file`);
|
||||||
return false;
|
return Promise.resolve(false);
|
||||||
}
|
}
|
||||||
var s = safeGetServer(ip, "wget");
|
var s = safeGetServer(ip, "wget");
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
|
Loading…
Reference in New Issue
Block a user