(command: str)
| 47 | |
| 48 | |
| 49 | def _split_command(command: str) -> list[str]: |
| 50 | raw = str(command or "").strip() |
| 51 | if not raw: |
| 52 | return [] |
| 53 | try: |
| 54 | return shlex.split(raw, posix=platform.system() != "Windows") |
| 55 | except ValueError: |
| 56 | return raw.split() |
| 57 | |
| 58 | |
| 59 | def _truncate_shell_chain(tokens: list[str]) -> list[str]: |
no outgoing calls
no test coverage detected