( mode: OutputMode, hint?: string, )
| 1 | import type { OutputMode } from "~/shell/ui/env.js"; |
| 2 | |
| 3 | export function assertHumanMode( |
| 4 | mode: OutputMode, |
| 5 | hint?: string, |
| 6 | ): asserts mode is "human" { |
| 7 | if (mode !== "human") { |
| 8 | const message = hint |
| 9 | ? `This command requires an interactive terminal. ${hint}` |
| 10 | : "This command requires an interactive terminal."; |
| 11 | throw Error(message); |
| 12 | } |
| 13 | } |
no outgoing calls
no test coverage detected