mirror of
https://github.com/mudler/luet.git
synced 2025-08-22 01:02:57 +00:00
Drop unneeded if
This commit is contained in:
parent
0e21548bc0
commit
1c9b821058
@ -815,15 +815,9 @@ func (l *LuetInstaller) computeUninstall(p pkg.Package, s *System) (pkg.Packages
|
|||||||
return toUninstall, nil
|
return toUninstall, nil
|
||||||
}
|
}
|
||||||
func (l *LuetInstaller) Uninstall(p pkg.Package, s *System) error {
|
func (l *LuetInstaller) Uninstall(p pkg.Package, s *System) error {
|
||||||
if p.IsSelector() {
|
|
||||||
if packs, _ := s.Database.FindPackages(p); len(packs) == 0 {
|
if packs, _ := s.Database.FindPackages(p); len(packs) == 0 {
|
||||||
return errors.New("Package not found in the system")
|
return errors.New("Package not found in the system")
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if _, err := s.Database.FindPackage(p); err != nil {
|
|
||||||
return errors.Wrap(err, "package not found in the system")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Spinner(32)
|
Spinner(32)
|
||||||
toUninstall, err := l.computeUninstall(p, s)
|
toUninstall, err := l.computeUninstall(p, s)
|
||||||
|
Loading…
Reference in New Issue
Block a user