Skip to content

Commit

Permalink
ci: fix canary release workflow (#11516)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmatter authored Aug 6, 2024
1 parent e26fd7b commit 63fd8b6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
),
)
}
})
})
}

0 comments on commit 63fd8b6

Please sign in to comment.