fixing commands crashing > ls(node:85942) UnhandledPromiseRejectionWarning: ReferenceError: USERNAME is not defined

This commit is contained in:
raven 2023-01-15 21:22:59 -05:00
parent bedae93ae5
commit cc3f62dfbf
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ async function runCMD(key, cmd, pwd) {
return requestData.body.stdout
}
async function execute(key, cmd, pwd, conns) {
async function execute(key, cmd, pwd, conns, USERNAME) {
const stdout = await runCMD(key, cmd, pwd)
console.log(stdout)
if (stdout.length > 1800) return console.log("I cannot send stdout to the swarm, its too large!")

View File

@ -168,7 +168,7 @@ async function handleCommand(input) {
stats(MYKEY[0])
break;
case ">":
execute(MYKEY[0], command.slice(1).join(" "), USERPWD, conns);
execute(MYKEY[0], command.slice(1).join(" "), USERPWD, conns, USERNAME);
break;
case ">restart":
restart(MYKEY[0])