You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Utilize Cobra's "MarkFlagsMutuallyExclusive()" on root command.
This shifts validation to flag parsing and remove the manual
check from "PersistentPreRunE", which can be applied to all
subcommands before hooks fire.
Signed-off-by: I-Hsin Cheng <[email protected]>
// TODO: "survey" does not support using cygwin terminal on windows yet
126
126
rootCmd.PersistentFlags().Bool("tty", isatty.IsTerminal(os.Stdout.Fd()), "Enable TUI interactions such as opening an editor. Defaults to true when stdout is a terminal. Set to false for automation.")
127
127
rootCmd.PersistentFlags().BoolP("yes", "y", false, "Alias of --tty=false")
0 commit comments