@@ -638,24 +638,22 @@ function executeCommandLineWorker(
638638 if ( configFileName ) {
639639 const extendedConfigCache = new Map < string , ExtendedConfigCacheEntry > ( ) ;
640640 const configParseResult = parseConfigFileWithSystem ( configFileName , commandLineOptions , extendedConfigCache , commandLine . watchOptions , sys , reportDiagnostic ) ! ; // TODO: GH#18217
641- if ( commandLineOptions . showConfig ) {
642- // For --showConfig, filter out "no inputs found" errors since the purpose is to show configuration, not compile
643- const errorsExcludingNoInputs = configParseResult . errors . filter ( error =>
644- error . code !== Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 . code
645- ) ;
646-
647- if ( errorsExcludingNoInputs . length !== 0 ) {
648- reportDiagnostic = updateReportDiagnostic (
649- sys ,
650- reportDiagnostic ,
651- configParseResult . options ,
652- ) ;
653- errorsExcludingNoInputs . forEach ( reportDiagnostic ) ;
654- return sys . exit ( ExitStatus . DiagnosticsPresent_OutputsSkipped ) ;
655- }
656- // eslint-disable-next-line no-restricted-syntax
657- sys . write ( JSON . stringify ( convertToTSConfig ( configParseResult , configFileName , sys ) , null , 4 ) + sys . newLine ) ;
658- return sys . exit ( ExitStatus . Success ) ;
641+ if ( commandLineOptions . showConfig ) {
642+ // For --showConfig, filter out "no inputs found" errors since the purpose is to show configuration, not compile
643+ const errorsExcludingNoInputs = configParseResult . errors . filter ( error => error . code !== Diagnostics . No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2 . code ) ;
644+
645+ if ( errorsExcludingNoInputs . length !== 0 ) {
646+ reportDiagnostic = updateReportDiagnostic (
647+ sys ,
648+ reportDiagnostic ,
649+ configParseResult . options ,
650+ ) ;
651+ errorsExcludingNoInputs . forEach ( reportDiagnostic ) ;
652+ return sys . exit ( ExitStatus . DiagnosticsPresent_OutputsSkipped ) ;
653+ }
654+ // eslint-disable-next-line no-restricted-syntax
655+ sys . write ( JSON . stringify ( convertToTSConfig ( configParseResult , configFileName , sys ) , null , 4 ) + sys . newLine ) ;
656+ return sys . exit ( ExitStatus . Success ) ;
659657 }
660658 reportDiagnostic = updateReportDiagnostic (
661659 sys ,
0 commit comments