Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions cmd/limactl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ func newApp() *cobra.Command {
// TODO: "survey" does not support using cygwin terminal on windows yet
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.")
rootCmd.PersistentFlags().BoolP("yes", "y", false, "Alias of --tty=false")
rootCmd.MarkFlagsMutuallyExclusive("tty", "yes")
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {
if err := processGlobalFlags(rootCmd); err != nil {
return err
Expand All @@ -150,10 +151,6 @@ func newApp() *cobra.Command {
return errors.New("must not run on NFS dir")
}

if cmd.Flags().Changed("yes") && cmd.Flags().Changed("tty") {
return errors.New("cannot use both --tty and --yes flags at the same time")
}

if cmd.Flags().Changed("yes") {
// Sets the value of the yesValue flag by using the yes flag.
yesValue, _ := cmd.Flags().GetBool("yes")
Expand Down
Loading