(args: string[], flag: string)
| 37 | } |
| 38 | |
| 39 | function valueAfter(args: string[], flag: string): string | null { |
| 40 | const index = args.indexOf(flag); |
| 41 | if (index === -1) return null; |
| 42 | // Reject a flag-shaped value so `--rekey-v22-dir-identity --force` doesn't |
| 43 | // consume `--force` as the project path (see doctor-pi.ts valueAfter). |
| 44 | const next = args[index + 1]; |
| 45 | if (next === undefined || next.startsWith("--")) return null; |
| 46 | return next; |
| 47 | } |
| 48 | |
| 49 | function printUsage(): void { |
| 50 | console.log(""); |