1717 * under the License.
1818 */
1919
20- import { resolve } from 'path' ;
20+ import { resolve , relative } from 'path' ;
2121
2222import execa from 'execa' ;
2323
@@ -35,7 +35,7 @@ export async function runCheckTsProjectsCli() {
3535 } ) ;
3636
3737 const isNotInTsProject : File [ ] = [ ] ;
38- const isInMultipleTsProjects : File [ ] = [ ] ;
38+ const isInMultipleTsProjects : string [ ] = [ ] ;
3939
4040 for ( const lineRaw of files . split ( '\n' ) ) {
4141 const line = lineRaw . trim ( ) ;
@@ -56,7 +56,11 @@ export async function runCheckTsProjectsCli() {
5656 isNotInTsProject . push ( file ) ;
5757 }
5858 if ( projects . length > 1 && ! file . isTypescriptAmbient ( ) ) {
59- isInMultipleTsProjects . push ( file ) ;
59+ isInMultipleTsProjects . push (
60+ ` - ${ file . getRelativePath ( ) } :\n${ projects
61+ . map ( ( p ) => ` - ${ relative ( process . cwd ( ) , p . tsConfigPath ) } ` )
62+ . join ( '\n' ) } `
63+ ) ;
6064 }
6165 }
6266
@@ -74,10 +78,9 @@ export async function runCheckTsProjectsCli() {
7478 }
7579
7680 if ( isInMultipleTsProjects . length ) {
81+ const details = isInMultipleTsProjects . join ( '\n' ) ;
7782 log . error (
78- `The following files belong to multiple tsconfig.json files listed in src/dev/typescript/projects.ts\n${ isInMultipleTsProjects
79- . map ( ( file ) => ` - ${ file . getRelativePath ( ) } ` )
80- . join ( '\n' ) } `
83+ `The following files belong to multiple tsconfig.json files listed in src/dev/typescript/projects.ts\n${ details } `
8184 ) ;
8285 }
8386
0 commit comments