diff options
author | 2023-03-27 17:39:20 -0400 | |
---|---|---|
committer | 2023-03-27 17:39:20 -0400 | |
commit | c853ffc6067cf1d4e877b87221c800f6447d459a (patch) | |
tree | 65a15d035092b8c960c1bec76297323cd678b855 | |
parent | 88a8e7ae1a460b2193e35ca60be8c4217864ab10 (diff) | |
download | astro-c853ffc6067cf1d4e877b87221c800f6447d459a.tar.gz astro-c853ffc6067cf1d4e877b87221c800f6447d459a.tar.zst astro-c853ffc6067cf1d4e877b87221c800f6447d459a.zip |
fix: log e.message
-rw-r--r-- | packages/create-astro/src/actions/template.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts index 1684a4c08..aa0363694 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<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 { |