Closed Galiley closed 4 years ago
The issue is in the file clean/clean.go
// Clear unused packs output.Printf("Finding unused dependencies") pac := exec.Command("pacman", "-Qtdq") var packs []string if out, err := pac.Output(); err == nil { for _, pack := range strings.Split(string(out), "\n") { if len(pack) > 1 { packs = append(packs, pack) } } }
When there is no unused dependencies, packs should be empty
packs = append([]string{"pacman", "-Rns"}, packs...) rem := exec.Command("sudo", packs...) output.SetStd(rem) if err := rem.Run(); err != nil { return err } return nil
This statement should be run only if packs isn't empty.
The issue is in the file clean/clean.go
When there is no unused dependencies, packs should be empty
This statement should be run only if packs isn't empty.