(cmd: string, args: string[])
| 54 | } |
| 55 | |
| 56 | function isAttachLike(cmd: string, args: string[]): boolean { |
| 57 | if (cmd === "docker" || cmd === "podman") { |
| 58 | if (args[0] === "attach") return true; |
| 59 | if (args[0] === "exec") return args.some((a) => a === "-it" || a === "-i" || a === "-t"); |
| 60 | } |
| 61 | if (cmd === "kubectl" || cmd === "k3s" || cmd === "oc") { |
| 62 | if (args[0] === "attach") return true; |
| 63 | if (args[0] === "exec") return args.some((a) => a === "-it" || a === "-i" || a === "-t"); |
| 64 | } |
| 65 | if (cmd === "lxc" && args[0] === "exec") return args.some((a) => a === "-t" || a === "-T"); |
| 66 | return false; |
| 67 | } |
| 68 | |
| 69 | function isSshInteractive(args: string[]): boolean { |
| 70 | const hasForcedTty = args.includes("-t") || args.includes("-tt"); |
no outgoing calls
no test coverage detected