@@ -25,15 +25,15 @@ export default async function handler(script: string, flags: CliFlags) {
2525 const directoryMapping : ArrayStringMap < RepoOwner , string > =
2626 new ArrayStringMap ( ) ;
2727 const scanDirectories : Map < string , string [ ] > = new Map ( ) ;
28- if ( flags . searchPath ) {
28+ if ( flags . search ) {
2929 // If it's one path, it won't be in an array. This converts it into an array.
30- if ( typeof flags . searchPath === "string" ) {
31- flags . searchPath = [ flags . searchPath ] ;
30+ if ( typeof flags . search === "string" ) {
31+ flags . search = [ flags . search ] ;
3232 }
3333 // What this code block does is simple. It stores in `scanDirectories`
3434 // a mapping of source path name to an array of directories in that directory.
3535 await Promise . all (
36- flags . searchPath . map ( async ( path ) => {
36+ flags . search . map ( async ( path ) => {
3737 scanDirectories . set (
3838 path ,
3939 await filterAsync ( await readdir ( path ) , async ( item ) => {
@@ -52,6 +52,7 @@ export default async function handler(script: string, flags: CliFlags) {
5252 for ( const [ path , directories ] of scanDirectories ) {
5353 for ( const directory of directories ) {
5454 if ( repo === directory ) {
55+ console . log ( `Found ${ repo } in ${ path } ` ) ;
5556 directoryMapping . set ( [ owner , repo ] , path ) ;
5657 break ;
5758 }
0 commit comments