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:
@@ -31,15 +31,7 @@ func (d *DepUpdate) Prepare() error {
|
||||
return fmt.Errorf("chart is required")
|
||||
}
|
||||
|
||||
args := make([]string, 0)
|
||||
|
||||
if d.namespace != "" {
|
||||
args = append(args, "--namespace", d.namespace)
|
||||
}
|
||||
if d.debug {
|
||||
args = append(args, "--debug")
|
||||
}
|
||||
|
||||
args := d.globalFlags()
|
||||
args = append(args, "dependency", "update", d.chart)
|
||||
|
||||
d.cmd = command(helmBin, args...)
|
||||
|
||||
Reference in New Issue
Block a user