Fix -Qu to respect -q. Fixes #726

This commit is contained in:
Jguer 2018-09-24 10:52:17 +01:00
parent 2826e7d79e
commit 293339263c
No known key found for this signature in database
GPG Key ID: 09754DBECF21746F

View File

@ -402,7 +402,11 @@ func printUpdateList(parser *arguments) error {
if !parser.existsArg("m", "foreign") {
for _, pkg := range repoUp {
if noTargets || targets.get(pkg.Name) {
fmt.Printf("%s %s -> %s\n", bold(pkg.Name), green(pkg.LocalVersion), green(pkg.RemoteVersion))
if parser.existsArg("q", "quiet") {
fmt.Printf("%s\n", pkg.Name)
} else {
fmt.Printf("%s %s -> %s\n", bold(pkg.Name), green(pkg.LocalVersion), green(pkg.RemoteVersion))
}
delete(targets, pkg.Name)
}
}
@ -411,7 +415,11 @@ func printUpdateList(parser *arguments) error {
if !parser.existsArg("n", "native") {
for _, pkg := range aurUp {
if noTargets || targets.get(pkg.Name) {
fmt.Printf("%s %s -> %s\n", bold(pkg.Name), green(pkg.LocalVersion), green(pkg.RemoteVersion))
if parser.existsArg("q", "quiet") {
fmt.Printf("%s\n", pkg.Name)
} else {
fmt.Printf("%s %s -> %s\n", bold(pkg.Name), green(pkg.LocalVersion), green(pkg.RemoteVersion))
}
delete(targets, pkg.Name)
}
}