* Extract the actual CLI name from a bash command string, skipping * env var assignments (e.g. `FOO=bar vercel` → `vercel`) and prefixes * in STRIPPED_COMMANDS.
(command: string | undefined)
| 541 | * in STRIPPED_COMMANDS. |
| 542 | */ |
| 543 | function extractCliName(command: string | undefined): string | undefined { |
| 544 | if (!command) return undefined |
| 545 | const tokens = command.trim().split(/\s+/) |
| 546 | for (const token of tokens) { |
| 547 | if (/^[A-Za-z_]\w*=/.test(token)) continue |
| 548 | if (STRIPPED_COMMANDS.has(token)) continue |
| 549 | return token |
| 550 | } |
| 551 | return undefined |
| 552 | } |
| 553 |
no test coverage detected