Skip to content

Commit

Permalink
fix(pkg): make sure the config entrypoint/cmd exist before looping ov…
Browse files Browse the repository at this point in the history
…er them

Signed-off-by: francesco-racciatti <[email protected]>
  • Loading branch information
francesco-racciatti committed Jun 28, 2024
1 parent aa384c2 commit a925832
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/kilt/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ func applyPatch(container *gabs.Container, config *configuration.Config, patchCo

entryPoint := gabs.New()
entryPoint.Set(make([]interface{}, 0))
rawEntryPoint := config.GetValue("build.entry_point").GetArray()
rawEntryPoint := config.GetValue("build.entry_point")
if rawEntryPoint != nil {
for _, c := range rawEntryPoint {
for _, c := range rawEntryPoint.GetArray() {
entryPoint.ArrayAppend(renderHoconValue(c))
}
}
Expand All @@ -167,9 +167,9 @@ func applyPatch(container *gabs.Container, config *configuration.Config, patchCo

command := gabs.New()
command.Set(make([]interface{}, 0))
rawCommand := config.GetValue("build.command").GetArray()
rawCommand := config.GetValue("build.command")
if rawCommand != nil {
for _, c := range rawCommand {
for _, c := range rawCommand.GetArray() {
command.ArrayAppend(renderHoconValue(c))
}
}
Expand Down

0 comments on commit a925832

Please sign in to comment.