Support --aur/--repo with -Sc

This commit is contained in:
morganamilo 2018-07-24 02:49:45 +01:00
parent 4063cf9282
commit 562a21fb4d
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E
2 changed files with 13 additions and 3 deletions

View File

@ -54,6 +54,7 @@ func cleanRemove(pkgNames []string) (err error) {
} }
func syncClean(parser *arguments) error { func syncClean(parser *arguments) error {
var err error
keepInstalled := false keepInstalled := false
keepCurrent := false keepCurrent := false
@ -67,10 +68,16 @@ func syncClean(parser *arguments) error {
} }
} }
err := show(passToPacman(parser)) if mode == ModeRepo || mode == ModeAny {
err = show(passToPacman(parser))
if err != nil { if err != nil {
return err return err
} }
}
if !(mode == ModeAUR || mode == ModeAny) {
return nil
}
var question string var question string
if removeAll { if removeAll {

View File

@ -157,6 +157,9 @@ func (parser *arguments) needRoot() bool {
if parser.existsArg("i", "info") { if parser.existsArg("i", "info") {
return false return false
} }
if parser.existsArg("c", "clean") && mode == ModeAUR {
return false
}
return true return true
case "U", "upgrade": case "U", "upgrade":
return true return true