mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
fix: log e.message
This commit is contained in:
parent
88a8e7ae1a
commit
c853ffc606
1 changed files with 7 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue