reduced nesting
parent
2792c9b9c9
commit
c7ac4a1290
|
@ -637,14 +637,14 @@ func VerifyNotPaused(profile string, enable bool) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "check paused")
|
return errors.Wrap(err, "check paused")
|
||||||
}
|
}
|
||||||
if runtimePaused {
|
if !runtimePaused {
|
||||||
action := "disable"
|
return nil
|
||||||
if enable {
|
|
||||||
action = "enable"
|
|
||||||
}
|
|
||||||
msg := fmt.Sprintf("Can't %s addon on a paused cluster, please unpause the cluster first.", action)
|
|
||||||
out.Styled(style.Shrug, msg)
|
|
||||||
return errors.New(msg)
|
|
||||||
}
|
}
|
||||||
return nil
|
action := "disable"
|
||||||
|
if enable {
|
||||||
|
action = "enable"
|
||||||
|
}
|
||||||
|
msg := fmt.Sprintf("Can't %s addon on a paused cluster, please unpause the cluster first.", action)
|
||||||
|
out.Styled(style.Shrug, msg)
|
||||||
|
return errors.New(msg)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue