Skip to content

Commit

Permalink
Fix nil panic when config has no spec.k0s (#291)
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke committed Dec 15, 2021
1 parent 995dc83 commit ac73072
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Spec struct {
func (s *Spec) UnmarshalYAML(unmarshal func(interface{}) error) error {
type spec Spec
ys := (*spec)(s)
ys.K0s = &K0s{}

if err := unmarshal(ys); err != nil {
return err
Expand Down

0 comments on commit ac73072

Please sign in to comment.