fix: don't do anything on unknown errors

This commit is contained in:
Princesseuh 2023-10-11 11:18:21 +02:00
parent 9cee5b7c73
commit 9a2a202586
No known key found for this signature in database
GPG key ID: 105BBD6D57F2B0C0

View file

@ -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,