Skip to content

Commit

Permalink
Using query command --export flag raises an error that it cannot be u…
Browse files Browse the repository at this point in the history
…sed in interactive mode, even when not in interactive mode. Closes #2707
  • Loading branch information
kaidaguerre committed Nov 8, 2022
1 parent f90ec6c commit b40cc09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func validateQueryArgs(ctx context.Context, args []string) error {
if interactiveMode && (viper.IsSet(constants.ArgSnapshot) || viper.IsSet(constants.ArgShare)) {
return fmt.Errorf("cannot share snapshots in interactive mode")
}
if len(viper.GetStringSlice(constants.ArgExport)) > 0 {
if interactiveMode && len(viper.GetStringSlice(constants.ArgExport)) > 0 {
return fmt.Errorf("cannot export query results in interactive mode")
}
// if share or snapshot args are set, there must be a query specified
Expand Down

0 comments on commit b40cc09

Please sign in to comment.