Fix scp and write in ns1

This commit is contained in:
Olivier Gagnon 2022-08-26 17:49:27 -04:00
parent 2463fc2012
commit 5f41226c21

@ -124,7 +124,7 @@ function startNetscript1Script(workerScript: WorkerScript): Promise<void> {
const entry = ns[name];
if (typeof entry === "function") {
//Async functions need to be wrapped. See JS-Interpreter documentation
const asyncFuncs = ["hack", "grow", "weaken", "sleep", "prompt", "manualHack", "scp", "write", "share", "wget"];
const asyncFuncs = ["hack", "grow", "weaken", "sleep", "prompt", "manualHack", "share", "wget"];
if (asyncFuncs.includes(name)) {
const tempWrapper = function (...args: unknown[]): void {