Skip to content

Commit

Permalink
if plans are missing from operator yaml it results in a nil map. no j…
Browse files Browse the repository at this point in the history
…oy. this fixes that (#1300)

Signed-off-by: Ken Sipe <kensipe@gmail.com>
  • Loading branch information
kensipe committed Jan 23, 2020
1 parent 34a93d7 commit 423acdb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kudoctl/cmd/generate/plans.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ func AddPlan(fs afero.Fs, path string, planName string, plan *v1beta1.Plan) erro
}

o := pf.Files.Operator
if o.Plans == nil {
o.Plans = make(map[string]v1beta1.Plan)
}
plans := o.Plans
plans[planName] = *plan
pf.Files.Operator.Plans = plans
Expand Down

0 comments on commit 423acdb

Please sign in to comment.