ci: fix canary release workflow (#11516)

This commit is contained in:
David Matter 2024-08-06 08:34:31 +02:00 committed by GitHub
parent e26fd7b1d1
commit 63fd8b683a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 2 deletions

View File

@ -95,8 +95,17 @@ export async function exec(command, args, options) {
const ok = code === 0
const stderr = Buffer.concat(stderrChunks).toString().trim()
const stdout = Buffer.concat(stdoutChunks).toString().trim()
const result = { ok, code, stderr, stdout }
resolve(result)
if (ok) {
const result = { ok, code, stderr, stdout }
resolve(result)
} else {
reject(
new Error(
`Failed to execute command: ${command} ${args.join(' ')}: ${stderr}`,
),
)
}
})
})
}