Fix error when installing, updating or remove packages

This commit is contained in:
2025-05-13 20:44:16 +03:00
parent f20d7b66d1
commit d26d878308
2 changed files with 23 additions and 1 deletions
+4 -1
View File
@@ -99,7 +99,10 @@ func (hook *BPMHook) Execute(packageChanges map[string]string, verbose bool, roo
// Get modified files slice
modifiedFiles := make([]*PackageFileEntry, 0)
for pkg := range packageChanges {
modifiedFiles = append(modifiedFiles, GetPackage(pkg, rootDir).PkgFiles...)
if GetPackage(pkg, rootDir) != nil {
modifiedFiles = append(modifiedFiles, GetPackage(pkg, rootDir).PkgFiles...)
}
}
// Check if any targets are met