Skip to content

Commit

Permalink
Merge pull request #18 from riiid/fix/error-message
Browse files Browse the repository at this point in the history
Fix(spec-fetcher): to print original error message when command error occured
  • Loading branch information
hyo-choi authored Jan 26, 2024
2 parents cb3c70d + 7594dfb commit bcfc145
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/team/component/santa/spec-fetcher/src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ const fetcher = async (opts: FetcherOptions) => {
},
).output();
if (!output.success) {
const errorMessage = new TextDecoder().decode(output.stderr);
throw new Error(
`🚨 Failed to download ${specName}.
Please check artifacts of glob pattern "${filenamePattern}" in version "${releaseTitle}" exists.`,
`spec-fetcher: 🚨 Failed to download ${specName}.\nPlease check below original error message.\n\n${errorMessage}`,
);
}
await fs.access(specOutputDir);
Expand Down

0 comments on commit bcfc145

Please sign in to comment.