fix query info with -Si

This commit is contained in:
l4 2018-01-06 20:50:54 +07:00
parent 82a4b30484
commit ba143bdb36
2 changed files with 10 additions and 5 deletions

View File

@ -211,7 +211,7 @@ func passToPacman(op string, pkgs []string, flags []string) error {
args = append(args, flags...)
}
if strings.Contains(op, "-Q") || op == "Si" {
if strings.Contains(op, "-Q") || op == "-Si" {
cmd = exec.Command(config.PacmanBin, args...)
} else {
args = append([]string{config.PacmanBin}, args...)

View File

@ -158,6 +158,15 @@ func syncInfo(pkgS []string, flags []string) (err error) {
return
}
//repo always goes first
if len(repoS) != 0 {
err = passToPacman("-Si", repoS, flags)
if err != nil {
return
}
}
if len(aurS) != 0 {
q, err := rpc.Info(aurS)
if err != nil {
@ -168,10 +177,6 @@ func syncInfo(pkgS []string, flags []string) (err error) {
}
}
if len(repoS) != 0 {
err = passToPacman("-Si", repoS, flags)
}
return
}