Skip to content

Commit 610682e

Browse files
committed
Avoid nil panics because of uninitialized host env map
Signed-off-by: Kimmo Lehto <[email protected]>
1 parent ac73072 commit 610682e

File tree

1 file changed

+2
-0
lines changed
  • pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster

1 file changed

+2
-0
lines changed

pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ func (h *Host) UnmarshalYAML(unmarshal func(interface{}) error) error {
130130
type host Host
131131
yh := (*host)(h)
132132

133+
yh.Environment = make(map[string]string)
134+
133135
if err := unmarshal(yh); err != nil {
134136
return err
135137
}

0 commit comments

Comments
 (0)