mirror of
https://github.com/Jguer/yay
synced 2024-10-04 15:19:08 +00:00
check hook is not nil
This commit is contained in:
parent
3fc5d93243
commit
a724d1554f
|
@ -25,6 +25,10 @@ type (
|
|||
)
|
||||
|
||||
func (installer *Installer) AddPostInstallHook(hook PostInstallHookFunc) {
|
||||
if hook == nil {
|
||||
return
|
||||
}
|
||||
|
||||
installer.postInstallHooks = append(installer.postInstallHooks, hook)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue