Skip to content

Commit

Permalink
fix(internal): Check if volume is populated also (#1962)
Browse files Browse the repository at this point in the history
Reviewed-by: Alexander Jung <[email protected]>
Approved-by: Alexander Jung <[email protected]>
  • Loading branch information
nderjung authored Nov 19, 2024
2 parents 8497e22 + 0870485 commit 0d5eff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cli/kraft/run/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (opts *RunOptions) parseKraftfileVolumes(ctx context.Context, project app.A
},
})

if err == nil && vol.Spec.Source != "" {
if err == nil && vol != nil && vol.Spec.Source != "" {
vol.Spec.Destination = volcfg.Destination()
machine.Spec.Volumes = append(machine.Spec.Volumes, *vol)
continue
Expand Down

0 comments on commit 0d5eff7

Please sign in to comment.