diff --git a/cmd.go b/cmd.go index d58f4d10..147eb594 100644 --- a/cmd.go +++ b/cmd.go @@ -462,7 +462,11 @@ func passToPacman(args *arguments) error { cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr err := cmd.Run() - return err + + if err != nil { + return fmt.Errorf("") + } + return nil } //passToPacman but return the output instead of showing the user diff --git a/main.go b/main.go index b522d247..21f8ab59 100644 --- a/main.go +++ b/main.go @@ -203,7 +203,10 @@ func main() { err = handleCmd() if err != nil { - fmt.Println(err) + if err.Error() != "" { + fmt.Println(err) + } + status = 1 goto cleanup } diff --git a/print.go b/print.go index ecf245fa..7c9a0f08 100644 --- a/print.go +++ b/print.go @@ -333,8 +333,28 @@ func printUpdateList(parser *arguments) error { } } + missing := false + +outer: for pkg := range parser.targets { + for _, name := range localNames { + if name == pkg { + continue outer + } + } + + for _, name := range remoteNames { + if name == pkg { + continue outer + } + } + fmt.Println(red(bold("error:")), "package '"+pkg+"' was not found") + missing = true + } + + if missing { + return fmt.Errorf("") } return nil