]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
ci: fix canary release workflow (#11516)
authorDavid Matter <davidmatter@users.noreply.github.com>
Tue, 6 Aug 2024 06:34:31 +0000 (08:34 +0200)
committerGitHub <noreply@github.com>
Tue, 6 Aug 2024 06:34:31 +0000 (14:34 +0800)
scripts/utils.js

index 2050b05b7cd8d50ddd592eac21df4f0d634fbc5f..056d95b7b09f45a7a5b5a35c8e7d5919eda22b49 100644 (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}`,
+          ),
+        )
+      }
     })
   })
 }