Skip to content

Commit 6f9e5a5

Browse files
committed
Fix flag name
1 parent 4ec1064 commit 6f9e5a5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/handler.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export interface CliFlags {
22
owner?: string;
3-
searchPath?: string | string[];
3+
search?: string | string[];
44
_: string[];
55
}
66

0 commit comments

Comments
 (0)