Skip to content

Commit

Permalink
Make --skip-needs=true the default option (#1835)
Browse files Browse the repository at this point in the history
Ref #1830 (comment)
Ref #1692
Follow-up for #1772
  • Loading branch information
mumoshu committed May 9, 2021
1 parent 794ab9f commit efa404e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions main.go
Expand Up @@ -199,9 +199,9 @@ func main() {
Name: "include-tests",
Usage: "enable the diffing of the helm test hooks",
},
cli.BoolFlag{
cli.BoolTFlag{
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{
Name: "include-needs",
Expand Down Expand Up @@ -403,9 +403,9 @@ func main() {
Name: "skip-deps",
Usage: `skip running "helm repo update" and "helm dependency build"`,
},
cli.BoolFlag{
cli.BoolTFlag{
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{
Name: "include-needs",
Expand Down Expand Up @@ -472,9 +472,9 @@ func main() {
Name: "skip-crds",
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",
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{
Name: "include-needs",
Expand Down Expand Up @@ -761,7 +761,11 @@ func (c configImpl) HasCommandName(name string) bool {
}

func (c configImpl) SkipNeeds() bool {
return c.c.Bool("skip-needs")
if !c.IncludeNeeds() {
return c.c.Bool("skip-needs")
}

return false
}

func (c configImpl) IncludeNeeds() bool {
Expand Down

0 comments on commit efa404e

Please sign in to comment.