Skip to content

Commit

Permalink
Wrap -Sp
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Morganamilo committed Jul 25, 2018
1 parent 96532c0 commit c4fec3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
10 changes: 6 additions & 4 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand All @@ -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
}
Expand Down

0 comments on commit c4fec3d

Please sign in to comment.