Skip to content

Commit

Permalink
fix: crash on error
Browse files Browse the repository at this point in the history
  • Loading branch information
birme committed Dec 2, 2024
1 parent 654b9e8 commit ae9d96d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,14 @@ export async function uploadPackage(
['cp', '--recursive', stagingDir, dest.toString()],
s3EndpointUrl
);
const { status, stderr, error } = spawnSync('aws', args, {
const { status, error } = spawnSync('aws', args, {
stdio: 'ignore'
});
if (status !== 0) {
if (error) {
console.error(`Upload failed: ${error.message}`);
} else {
console.error(`Upload failed with exit code ${status}`);
console.error(stderr.toString());
}
throw new Error('Upload failed');
}
Expand Down

0 comments on commit ae9d96d

Please sign in to comment.