Remove duplicate shell reporting
parent
30ba3fcca7
commit
9921d72b96
|
@ -352,19 +352,11 @@ export class HttpServer {
|
||||||
switch (body.operation) {
|
switch (body.operation) {
|
||||||
case "shell": {
|
case "shell": {
|
||||||
const shellCommand: ShellRequest = body;
|
const shellCommand: ShellRequest = body;
|
||||||
console.log(
|
|
||||||
"Running shell command:",
|
|
||||||
shellCommand.cmd,
|
|
||||||
shellCommand.args,
|
|
||||||
);
|
|
||||||
const shellResponse = await spaceServer.shellBackend.handle(
|
const shellResponse = await spaceServer.shellBackend.handle(
|
||||||
shellCommand,
|
shellCommand,
|
||||||
);
|
);
|
||||||
response.headers.set("Content-Type", "application/json");
|
response.headers.set("Content-Type", "application/json");
|
||||||
response.body = JSON.stringify(shellResponse);
|
response.body = JSON.stringify(shellResponse);
|
||||||
if (shellResponse.code !== 0) {
|
|
||||||
console.error("Error running shell command", shellResponse);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case "syscall": {
|
case "syscall": {
|
||||||
|
|
Loading…
Reference in New Issue