This commit is contained in:
Chris Wanstrath 2025-10-01 13:56:22 -07:00
parent 5c602ad976
commit ff282478b6

View File

@ -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") {