Skip to content

Commit

Permalink
fix(cloud): Allow multiple volume arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc committed Sep 16, 2024
1 parent 41c4412 commit 5e24610
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/cli/kraft/cloud/volume/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewCmd() *cobra.Command {
cmd, err := cmdfactory.New(&GetOptions{}, cobra.Command{
Short: "Retrieve the state of persistent volumes",
Use: "get [FLAGS] UUID|NAME",
Args: cobra.ExactArgs(1),
Args: cobra.MinimumNArgs(1),
Aliases: []string{"gt"},
Example: heredoc.Doc(`
# Retrieve information about a kraftcloud volume by UUID
Expand Down Expand Up @@ -82,9 +82,9 @@ func (opts *GetOptions) Run(ctx context.Context, args []string) error {
kraftcloud.WithToken(config.GetKraftCloudTokenAuthConfig(*auth)),
)

resp, err := client.WithMetro(opts.metro).Get(ctx, args[0])
resp, err := client.WithMetro(opts.metro).Get(ctx, args...)
if err != nil {
return fmt.Errorf("could not get volume %s: %w", args[0], err)
return fmt.Errorf("could not get volume %v: %w", args, err)
}

return utils.PrintVolumes(ctx, opts.Output, *resp)
Expand Down

0 comments on commit 5e24610

Please sign in to comment.