Skip to content

Commit

Permalink
Merge pull request #329 from ponkio-o/patch-1
Browse files Browse the repository at this point in the history
fix: added zero value check for ImageConfigRespose
  • Loading branch information
fujiwara committed Oct 19, 2023
1 parent 54fb48d commit e8f4b1b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lambroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,12 @@ func newFunctionFrom(c *types.FunctionConfiguration, code *types.FunctionCodeLoc
Variables: e.Variables,
}
}
if i := c.ImageConfigResponse; i != nil {
if ic := i.ImageConfig; ic != nil {
fn.ImageConfig = &types.ImageConfig{
Command: i.ImageConfig.Command,
EntryPoint: i.ImageConfig.EntryPoint,
WorkingDirectory: i.ImageConfig.WorkingDirectory,
}

if i := c.ImageConfigResponse; i != nil && i.ImageConfig != nil {
fn.ImageConfig = &types.ImageConfig{
Command: i.ImageConfig.Command,
EntryPoint: i.ImageConfig.EntryPoint,
WorkingDirectory: i.ImageConfig.WorkingDirectory,
}
}
for _, layer := range c.Layers {
Expand Down

0 comments on commit e8f4b1b

Please sign in to comment.