Skip to content

Commit

Permalink
exit early if publishing fails
Browse files Browse the repository at this point in the history
  • Loading branch information
AnActualEmerald committed Aug 22, 2024
1 parent a8b84e3 commit 374b4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const publish = async (target: string, file: string | undefined) => {
});
const out = pub.stdout.toString();

console.log(out);
if (pub.exitCode !== 0 || out.toLowerCase().includes("error")) {
console.log("::error::Tcli encountered an error while publishing");
console.log(`::error::${pub.stderr}`);
console.log(`::error::${out}`);
process.exit(1);
}

const url = out.match(/https.*/g)?.[0];
Expand Down

0 comments on commit 374b4c2

Please sign in to comment.