(parsed: ParsedPowerShellCommand)
| 1592 | */ |
| 1593 | // exported for testing |
| 1594 | export function isSingleCommand(parsed: ParsedPowerShellCommand): boolean { |
| 1595 | const stmt = parsed.statements[0] |
| 1596 | return ( |
| 1597 | parsed.statements.length === 1 && |
| 1598 | stmt !== undefined && |
| 1599 | stmt.commands.length === 1 && |
| 1600 | (!stmt.nestedCommands || stmt.nestedCommands.length === 0) |
| 1601 | ) |
| 1602 | } |
| 1603 | |
| 1604 | /** |
| 1605 | * Check if a specific command has a given argument/flag (case-insensitive). |
nothing calls this directly
no outgoing calls
no test coverage detected