Skip to content

Commit

Permalink
fix: crash on error (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
birme authored Dec 2, 2024
1 parent 654b9e8 commit 88c743e
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 88c743e

Please sign in to comment.