Skip to content

Commit

Permalink
Fix --size parsing on update
Browse files Browse the repository at this point in the history
  • Loading branch information
torrefatto committed Jul 23, 2024
1 parent cc86a06 commit c7e0000
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/koyeb/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,15 @@ func NewVolumeCmd() *cobra.Command {
if err != nil {
return err
}
req.SetMaxSize(size)
if size > 0 {
req.SetMaxSize(size)
}

return h.Update(ctx, cmd, args, req)
}),
}
updateVolumeCmd.Flags().String("name", "", "Change the volume name")
updateVolumeCmd.Flags().String("size", "", "Increase the volume size")
updateVolumeCmd.Flags().Int64("size", -1, "Increase the volume size")
volumeCmd.AddCommand(updateVolumeCmd)

deleteVolumeCmd := &cobra.Command{
Expand Down

0 comments on commit c7e0000

Please sign in to comment.