Bugfix for helm-binary flag. to global (#184)
Two follow-up commits for #181 * Make the --helm-binary flag global * Add helm-binary support to the delete command
This commit is contained in:
		
						commit
						35732f3a93
					
				
							
								
								
									
										32
									
								
								main.go
								
								
								
								
							
							
						
						
									
										32
									
								
								main.go
								
								
								
								
							|  | @ -78,8 +78,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(args...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					return state.SyncRepos(helm) | ||||
|  | @ -111,8 +111,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(args...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					values := c.StringSlice("values") | ||||
|  | @ -151,8 +151,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(args...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					if c.Bool("sync-repos") { | ||||
|  | @ -193,8 +193,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(strings.Split(args, " ")...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					values := c.StringSlice("values") | ||||
|  | @ -237,8 +237,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(args...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					values := c.StringSlice("values") | ||||
|  | @ -271,8 +271,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(args...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					return state.ReleaseStatuses(helm, workers) | ||||
|  | @ -292,6 +292,10 @@ func main() { | |||
| 				return eachDesiredStateDo(c, func(state *state.HelmState, helm helmexec.Interface) []error { | ||||
| 					purge := c.Bool("purge") | ||||
| 
 | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					return state.DeleteReleases(helm, purge) | ||||
| 				}) | ||||
| 			}, | ||||
|  | @ -324,8 +328,8 @@ func main() { | |||
| 					if len(args) > 0 { | ||||
| 						helm.SetExtraArgs(args...) | ||||
| 					} | ||||
| 					if c.String("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.String("helm-binary")) | ||||
| 					if c.GlobalString("helm-binary") != "" { | ||||
| 						helm.SetHelmBinary(c.GlobalString("helm-binary")) | ||||
| 					} | ||||
| 
 | ||||
| 					return state.TestReleases(helm, cleanup, timeout) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue