Skip to content

Commit

Permalink
Bail out of protobuf generation on error.
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterSpaak committed Mar 14, 2024
1 parent 2127590 commit 061b4e9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion typescript/proto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@ const options = [
];

const script = `protoc ${options.join(' ')}`;
exec(script);
exec(script, (err, stdout, stderr) => {
if (err) {
console.error(err);
process.exit(1);
}
console.log('Successfully generated typescript files.');
process.exit(0);
});

0 comments on commit 061b4e9

Please sign in to comment.