Currently we do not handle -Sp, this leads to yay trying a proper
install and failing. So instead pass it to pacman and exit. Ideally we
would extend -Sp to include AUR packages but for now don't bother.
This commit is contained in:
morganamilo 2018-07-25 03:45:34 +01:00
parent 96532c0b27
commit c4fec3dad0
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E
2 changed files with 8 additions and 4 deletions

2
cmd.go
View File

@ -417,6 +417,8 @@ func handleSync() (err error) {
}
err = syncSearch(targets)
} else if cmdArgs.existsArg("p", "print", "print-format") {
err = show(passToPacman(cmdArgs))
} else if cmdArgs.existsArg("c", "clean") {
err = syncClean(cmdArgs)
} else if cmdArgs.existsArg("l", "list") {

View File

@ -122,10 +122,6 @@ func (parser *arguments) needRoot() bool {
return false
}
if parser.existsArg("p", "print") {
return false
}
switch parser.op {
case "D", "database":
if parser.existsArg("k", "check") {
@ -145,6 +141,12 @@ func (parser *arguments) needRoot() bool {
case "R", "remove":
return true
case "S", "sync":
if parser.existsArg("y", "refresh") {
return true
}
if parser.existsArg("p", "print", "print-format") {
return false
}
if parser.existsArg("s", "search") {
return false
}