Skip to content

Commit

Permalink
upd(repair): return an error if no argument is passed to the repair c…
Browse files Browse the repository at this point in the history
…ommand

Co-authored-by: Diana Doherty <[email protected]>
  • Loading branch information
jayjayjpg and dianadoherty committed Feb 2, 2022
1 parent b26961d commit 9acaa71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/meroxa/root/environments/repair.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package environments

import (
"context"
"errors"

"github.com/meroxa/cli/cmd/meroxa/builder"
"github.com/meroxa/cli/log"
Expand Down Expand Up @@ -67,9 +68,10 @@ func (r *Repair) Client(client meroxa.Client) {
}

func (r *Repair) ParseArgs(args []string) error {
if len(args) > 0 {
r.args.NameOrUUID = args[0]
if len(args) < 1 {
return errors.New("requires environment name or uuid")
}
r.args.NameOrUUID = args[0]
return nil
}

Expand Down

0 comments on commit 9acaa71

Please sign in to comment.