@@ -25,15 +25,15 @@ export default async function handler(script: string, flags: CliFlags) {
25
25
const directoryMapping : ArrayStringMap < RepoOwner , string > =
26
26
new ArrayStringMap ( ) ;
27
27
const scanDirectories : Map < string , string [ ] > = new Map ( ) ;
28
- if ( flags . searchPath ) {
28
+ if ( flags . search ) {
29
29
// 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 ] ;
32
32
}
33
33
// What this code block does is simple. It stores in `scanDirectories`
34
34
// a mapping of source path name to an array of directories in that directory.
35
35
await Promise . all (
36
- flags . searchPath . map ( async ( path ) => {
36
+ flags . search . map ( async ( path ) => {
37
37
scanDirectories . set (
38
38
path ,
39
39
await filterAsync ( await readdir ( path ) , async ( item ) => {
@@ -52,6 +52,7 @@ export default async function handler(script: string, flags: CliFlags) {
52
52
for ( const [ path , directories ] of scanDirectories ) {
53
53
for ( const directory of directories ) {
54
54
if ( repo === directory ) {
55
+ console . log ( `Found ${ repo } in ${ path } ` ) ;
55
56
directoryMapping . set ( [ owner , repo ] , path ) ;
56
57
break ;
57
58
}
0 commit comments