From c853ffc6067cf1d4e877b87221c800f6447d459a Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Mon, 27 Mar 2023 17:39:20 -0400 Subject: [PATCH] fix: log e.message --- packages/create-astro/src/actions/template.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts index 1684a4c084dc..aa0363694862 100644 --- a/packages/create-astro/src/actions/template.ts +++ b/packages/create-astro/src/actions/template.ts @@ -35,8 +35,13 @@ export async function template(ctx: Pick 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 {