Extract the debug/namespace flags into run.Config [#67]
This is a general-purpose cleanup commit; every step except InitKube had the same six "add the --debug and --namespace flags if applicable" code.
This commit is contained in:
@@ -60,15 +60,7 @@ func (u *Upgrade) Prepare() error {
|
||||
return fmt.Errorf("release is required")
|
||||
}
|
||||
|
||||
args := make([]string, 0)
|
||||
|
||||
if u.namespace != "" {
|
||||
args = append(args, "--namespace", u.namespace)
|
||||
}
|
||||
if u.debug {
|
||||
args = append(args, "--debug")
|
||||
}
|
||||
|
||||
args := u.globalFlags()
|
||||
args = append(args, "upgrade", "--install")
|
||||
|
||||
if u.chartVersion != "" {
|
||||
|
||||
Reference in New Issue
Block a user