Skip to content

Commit

Permalink
cmd/atlas/internal/cmdapi: remove --plan and --to constraint (#3167)
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m authored Sep 30, 2024
1 parent 88fd18f commit 761947b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/atlas/internal/cmdapi/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ func (f *schemaApplyFlags) check(env *Env) error {
switch {
case f.url == "":
return errors.New(`required flag(s) "url" not set`)
case f.planURL != "" && len(f.toURLs) == 0:
return errors.New(`the flag "to" is required to verify the provided plan`)
case len(f.paths) == 0 && len(f.toURLs) == 0:
if f.planURL != "" {
return errors.New(`the flag "to" is required to verify the provided plan`)
}
return errors.New(`one of flag(s) "file" or "to" is required`)
case f.txMode != txModeNone && f.txMode != txModeFile:
return fmt.Errorf("unknown tx-mode %q", f.txMode)
Expand Down

0 comments on commit 761947b

Please sign in to comment.