(cmd *cobra.Command)
| 166 | } |
| 167 | |
| 168 | func canPrompt(cmd *cobra.Command) bool { |
| 169 | noInput, err := cmd.Root().Flags().GetBool("no-input") |
| 170 | if err != nil { |
| 171 | return false |
| 172 | } |
| 173 | |
| 174 | return iostream.IsInputTerminal() && iostream.IsOutputTerminal() && !noInput |
| 175 | } |
| 176 | |
| 177 | // noLocalFlagSet returns true if no local flags (excluding global flags) are set for the command. |
| 178 | func noLocalFlagSet(cmd *cobra.Command) bool { |
no test coverage detected