mirror of
https://github.com/EnumeratedDev/bpm.git
synced 2026-10-31 11:01:48 +00:00
Fixed ActionsContainPackage BPMOperation receiver function incorrectly returning false
This commit is contained in:
1 parent
0b439bcfed
commit
fe928dbbd6
1 file changed
+9
-3
+9
-3
@@ -18,11 +18,17 @@ type BPMOperation struct {
|
|||||||
func (operation *BPMOperation) ActionsContainPackage(pkg string) bool {
|
func (operation *BPMOperation) ActionsContainPackage(pkg string) bool {
|
||||||
for _, action := range operation.Actions {
|
for _, action := range operation.Actions {
|
||||||
if action.GetActionType() == "install" {
|
if action.GetActionType() == "install" {
|
||||||
return action.(*InstallPackageAction).BpmPackage.PkgInfo.Name == pkg
|
if action.(*InstallPackageAction).BpmPackage.PkgInfo.Name == pkg {
|
||||||
|
return true
|
||||||
|
}
|
||||||
} else if action.GetActionType() == "fetch" {
|
} else if action.GetActionType() == "fetch" {
|
||||||
return action.(*FetchPackageAction).RepositoryEntry.Info.Name == pkg
|
if action.(*FetchPackageAction).RepositoryEntry.Info.Name == pkg {
|
||||||
|
return true
|
||||||
|
}
|
||||||
} else if action.GetActionType() == "remove" {
|
} else if action.GetActionType() == "remove" {
|
||||||
return action.(*RemovePackageAction).BpmPackage.PkgInfo.Name == pkg
|
if action.(*RemovePackageAction).BpmPackage.PkgInfo.Name == pkg {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in new issue
Block a user