game
This commit is contained in:
parent
5c602ad976
commit
ff282478b6
|
|
@ -44,6 +44,9 @@ async function exec(cmd: string, args: string[]): Promise<CommandResult> {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function processExecOutput(output: string | any): CommandResult {
|
export function processExecOutput(output: string | any): CommandResult {
|
||||||
|
if (typeof output === "object" && "status" in output && "output" in output)
|
||||||
|
return output
|
||||||
|
|
||||||
if (typeof output === "string") {
|
if (typeof output === "string") {
|
||||||
return { status: "ok", output }
|
return { status: "ok", output }
|
||||||
} else if (typeof output === "object") {
|
} else if (typeof output === "object") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user