Skip to content

Commit

Permalink
refactor(flag): return error if both --download-db-only and `--down…
Browse files Browse the repository at this point in the history
…load-java-db-only` are specified (#7259)
  • Loading branch information
DmitriyLewen authored Jul 30, 2024
1 parent 54bb8bd commit f198cf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/flag/db_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ func (f *DBFlagGroup) ToOptions() (DBOptions, error) {
downloadDBOnly := f.DownloadDBOnly.Value()
downloadJavaDBOnly := f.DownloadJavaDBOnly.Value()

if downloadDBOnly && downloadJavaDBOnly {
return DBOptions{}, xerrors.New("--download-db-only and --download-java-db-only options can not be specified both")
}
if downloadDBOnly && skipDBUpdate {
return DBOptions{}, xerrors.New("--skip-db-update and --download-db-only options can not be specified both")
}
Expand Down

0 comments on commit f198cf8

Please sign in to comment.