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,