Skip to content

Commit

Permalink
fix: fix a potential NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
plumpy committed Nov 18, 2024
1 parent 3ce5d8a commit 1c347a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/skaffold/docker/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func extractCopyCommands(ctx context.Context, nodes []*parser.Node, onlyLastImag
}
case command.Env:
// one env command may define multiple variables
for node := node.Next; node != nil && node.Next != nil; node = node.Next.Next.Next {
for node := node.Next; node != nil && node.Next != nil && node.Next.Next != nil; node = node.Next.Next.Next {
envs = append(envs, fmt.Sprintf("%s=%s", node.Value, unquote(node.Next.Value)))
}
}
Expand Down

0 comments on commit 1c347a7

Please sign in to comment.