diff --git a/actions.go b/actions.go index 98f01f65..0a749ba5 100644 --- a/actions.go +++ b/actions.go @@ -39,15 +39,16 @@ func upgradePkgs(flags []string) error { aurUp, repoUp, err := upgrade.List() if err != nil { return err + } else if len(aurUp)+len(repoUp) == 0 { + fmt.Println("\nthere is nothing to do") + return err } - if len(aurUp)+len(repoUp) > 0 { - sort.Sort(repoUp) - fmt.Printf("\x1b[1;34;1m:: \x1b[0m\x1b[1m%d Packages to upgrade.\x1b[0m\n", len(aurUp)+len(repoUp)) - upgrade.Print(len(aurUp), repoUp) - upgrade.Print(0, aurUp) - fmt.Print("\x1b[32mEnter packages you don't want to upgrade.\x1b[0m\nNumbers: ") - } + sort.Sort(repoUp) + fmt.Printf("\x1b[1;34;1m:: \x1b[0m\x1b[1m%d Packages to upgrade.\x1b[0m\n", len(aurUp)+len(repoUp)) + upgrade.Print(len(aurUp), repoUp) + upgrade.Print(0, aurUp) + fmt.Print("\x1b[32mEnter packages you don't want to upgrade.\x1b[0m\nNumbers: ") reader := bufio.NewReader(os.Stdin) numberBuf, overflow, err := reader.ReadLine() diff --git a/upgrade/u.go b/upgrade/u.go index cdd43131..5a3b7907 100644 --- a/upgrade/u.go +++ b/upgrade/u.go @@ -140,12 +140,14 @@ func List() (aurUp Slice, repoUp Slice, err error) { aurC := make(chan []Upgrade) errC := make(chan error) + fmt.Println("\x1b[1;36;1m::\x1b[0m\x1b[1m Searching databases for updates...\x1b[0m") go func() { repoUpList, err := repo(local) errC <- err repoC <- repoUpList }() + fmt.Println("\x1b[1;36;1m::\x1b[0m\x1b[1m Searching AUR for updates...\x1b[0m") go func() { aurUpList, err := aur(remote, remoteNames) errC <- err