Skip to content

Commit 63fd8b6

Browse files
authored
ci: fix canary release workflow (vuejs#11516)
1 parent e26fd7b commit 63fd8b6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

scripts/utils.js

+11-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,17 @@ export async function exec(command, args, options) {
9595
const ok = code === 0
9696
const stderr = Buffer.concat(stderrChunks).toString().trim()
9797
const stdout = Buffer.concat(stdoutChunks).toString().trim()
98-
const result = { ok, code, stderr, stdout }
99-
resolve(result)
98+
99+
if (ok) {
100+
const result = { ok, code, stderr, stdout }
101+
resolve(result)
102+
} else {
103+
reject(
104+
new Error(
105+
`Failed to execute command: ${command} ${args.join(' ')}: ${stderr}`,
106+
),
107+
)
108+
}
100109
})
101110
})
102111
}

0 commit comments

Comments
 (0)