Make `--skip-needs=true` the default option (#1835)
Ref https://github.com/roboll/helmfile/issues/1830#issuecomment-835632716 Ref #1692 Follow-up for #1772
This commit is contained in:
		
							parent
							
								
									794ab9fc66
								
							
						
					
					
						commit
						efa404e275
					
				
							
								
								
									
										16
									
								
								main.go
								
								
								
								
							
							
						
						
									
										16
									
								
								main.go
								
								
								
								
							|  | @ -199,9 +199,9 @@ func main() { | ||||||
| 					Name:  "include-tests", | 					Name:  "include-tests", | ||||||
| 					Usage: "enable the diffing of the helm test hooks", | 					Usage: "enable the diffing of the helm test hooks", | ||||||
| 				}, | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolTFlag{ | ||||||
| 					Name:  "skip-needs", | 					Name:  "skip-needs", | ||||||
| 					Usage: `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when when --selector/-l flag is not provided`, | 					Usage: `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when when --selector/-l flag is not provided. Defaults to true when --include-needs is not provided`, | ||||||
| 				}, | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolFlag{ | ||||||
| 					Name:  "include-needs", | 					Name:  "include-needs", | ||||||
|  | @ -403,9 +403,9 @@ func main() { | ||||||
| 					Name:  "skip-deps", | 					Name:  "skip-deps", | ||||||
| 					Usage: `skip running "helm repo update" and "helm dependency build"`, | 					Usage: `skip running "helm repo update" and "helm dependency build"`, | ||||||
| 				}, | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolTFlag{ | ||||||
| 					Name:  "skip-needs", | 					Name:  "skip-needs", | ||||||
| 					Usage: `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when when --selector/-l flag is not provided`, | 					Usage: `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when when --selector/-l flag is not provided. Defaults to true when --include-needs is not provided`, | ||||||
| 				}, | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolFlag{ | ||||||
| 					Name:  "include-needs", | 					Name:  "include-needs", | ||||||
|  | @ -472,9 +472,9 @@ func main() { | ||||||
| 					Name:  "skip-crds", | 					Name:  "skip-crds", | ||||||
| 					Usage: "if set, no CRDs will be installed on sync. By default, CRDs are installed if not already present", | 					Usage: "if set, no CRDs will be installed on sync. By default, CRDs are installed if not already present", | ||||||
| 				}, | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolTFlag{ | ||||||
| 					Name:  "skip-needs", | 					Name:  "skip-needs", | ||||||
| 					Usage: `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when when --selector/-l flag is not provided`, | 					Usage: `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when when --selector/-l flag is not provided. Defaults to true when --include-needs is not provided`, | ||||||
| 				}, | 				}, | ||||||
| 				cli.BoolFlag{ | 				cli.BoolFlag{ | ||||||
| 					Name:  "include-needs", | 					Name:  "include-needs", | ||||||
|  | @ -761,9 +761,13 @@ func (c configImpl) HasCommandName(name string) bool { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c configImpl) SkipNeeds() bool { | func (c configImpl) SkipNeeds() bool { | ||||||
|  | 	if !c.IncludeNeeds() { | ||||||
| 		return c.c.Bool("skip-needs") | 		return c.c.Bool("skip-needs") | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	return false | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func (c configImpl) IncludeNeeds() bool { | func (c configImpl) IncludeNeeds() bool { | ||||||
| 	return c.c.Bool("include-needs") | 	return c.c.Bool("include-needs") | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue