From b16cb0ed3fb4d9905f3db630de0a0d894fa8b276 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 18 Sep 2025 16:19:51 -0700 Subject: [PATCH] Move incorrectly placed fixer --- src/compiler/executeCommandLine.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/compiler/executeCommandLine.ts b/src/compiler/executeCommandLine.ts index 3bfc1efd008..95ecfe51486 100644 --- a/src/compiler/executeCommandLine.ts +++ b/src/compiler/executeCommandLine.ts @@ -614,17 +614,6 @@ function executeCommandLineWorker( return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped); } } - - const fixRootDirLogs: string[] = []; - try { - const fixes = fixRootDirSync(configFileName, log => fixRootDirLogs.push(log)); - for (const [fileName, text] of Object.entries(fixes)) { - sys.writeFile(fileName, text); - } - } - catch (e) { - throw new Error([...fixRootDirLogs, `Error: ${e instanceof Error ? e.message : e}`].join(sys.newLine)); - } } else if (commandLine.fileNames.length === 0) { const searchPath = normalizePath(sys.getCurrentDirectory()); @@ -648,6 +637,17 @@ function executeCommandLineWorker( fileName => getNormalizedAbsolutePath(fileName, currentDirectory), ); if (configFileName) { + const fixRootDirLogs: string[] = []; + try { + const fixes = fixRootDirSync(configFileName, log => fixRootDirLogs.push(log)); + for (const [fileName, text] of Object.entries(fixes)) { + sys.writeFile(fileName, text); + } + } + catch (e) { + throw new Error([...fixRootDirLogs, `Error: ${e instanceof Error ? e.message : e}`].join(sys.newLine)); + } + const extendedConfigCache = new Map(); const configParseResult = parseConfigFileWithSystem(configFileName, commandLineOptions, extendedConfigCache, commandLine.watchOptions, sys, reportDiagnostic)!; // TODO: GH#18217 if (commandLineOptions.showConfig) {