From 9a2a202586e2e814deb34d0d2b417cd2310b5a4f Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Wed, 11 Oct 2023 11:18:21 +0200 Subject: [PATCH] fix: don't do anything on unknown errors --- packages/astro/src/cli/add/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index f84f67f1e..a20a20e4b 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -851,9 +851,9 @@ async function updateTSConfig( let inputConfig = await loadTSConfig(cwd); let inputConfigText = ''; - if (inputConfig === 'invalid-config') { + if (inputConfig === 'invalid-config' || inputConfig === 'unknown-error') { return UpdateResult.failure; - } else if (inputConfig === 'missing-config' || inputConfig === 'unknown-error') { + } else if (inputConfig === 'missing-config') { logger.debug('add', "Couldn't find tsconfig.json or jsconfig.json, generating one"); inputConfig = { tsconfig: defaultTSConfig,