Skip to content

Commit

Permalink
fix: log e.message
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Mar 27, 2023
1 parent 88a8e7a commit c853ffc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/create-astro/src/actions/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ export async function template(ctx: Pick<Context, 'template' | 'prompt' | 'dryRu
while: () =>
copyTemplate(ctx.template!, ctx as Context).catch((e) => {
// eslint-disable-next-line no-console
error('error', e);
process.exit(1);
if (e instanceof Error) {
error('error', e.message);
process.exit(1);
} else {
error('error', 'Unable to clone template.');
process.exit(1);
}
}),
});
} else {
Expand Down

0 comments on commit c853ffc

Please sign in to comment.