Skip to content

Commit

Permalink
fix nil
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
  • Loading branch information
Pavel Okhlopkov committed Jan 24, 2025
1 parent 53477c0 commit 2ba7f90
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions pkg/module_manager/models/hooks/kind/gohook.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,15 @@ func (h *GoHook) GetOnStartup() *float64 {
}

func (h *GoHook) GetBeforeAll() *float64 {
if h.config == nil || h.config.OnBeforeAll == nil {
return nil
if h.config != nil && h.config.OnBeforeAll != nil {
return &h.config.OnBeforeAll.Order
}

if h.config != nil && h.config.OnBeforeHelm != nil {
return &h.config.OnBeforeHelm.Order
}

return &h.config.OnBeforeAll.Order
return nil
}

func (h *GoHook) GetAfterAll() *float64 {
Expand Down

0 comments on commit 2ba7f90

Please sign in to comment.