File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ func initCLI(c *cli.Context) error {
3131
3232 cfg , err := config .Load (filename )
3333 if err != nil {
34- if os .IsNotExist (err ) {
35- cfg = & config.CLIConfig {}
36- } else {
34+ if ! os .IsNotExist (err ) {
3735 return err
3836 }
37+
38+ cfg = & config.CLIConfig {}
3939 }
4040
4141 environmentID := c .String (commands .EnvironmentIDKey )
Original file line number Diff line number Diff line change @@ -502,11 +502,11 @@ func (c *Base) calculateProtectionTime(durationMinutes *uint) *models.LocalTime
502502 maxMinutes := c .config .ProtectionMaxDurationMinutes
503503
504504 if minutes == 0 {
505- if maxMinutes > 0 {
506- minutes = maxMinutes
507- } else {
505+ if maxMinutes == 0 {
508506 return nil
509507 }
508+
509+ minutes = maxMinutes
510510 }
511511
512512 if maxMinutes > 0 && minutes > maxMinutes {
You can’t perform that action at this time.
0 commit comments