mirror of
https://github.com/Jguer/yay.git
synced 2025-08-19 05:31:18 +02:00
Outdated skip
This commit is contained in:
parent
05180e8b70
commit
1ac3b773a8
@ -226,13 +226,21 @@ func UpdatePackages(baseDir string, conf *alpm.PacmanConfig, flags string) error
|
||||
}
|
||||
}
|
||||
|
||||
//If there are no outdated packages, don't prompt
|
||||
if len(outdated) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Install updated packages
|
||||
if !strings.Contains(flags, "noconfirm") {
|
||||
fmt.Println("\033[1m\x1b[32m==> Proceed with upgrade\033[0m\033[1m (Y/n)\033[0m")
|
||||
var response string
|
||||
fmt.Scanln(&response)
|
||||
if strings.ContainsAny(response, "n & N") {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
for _, pkg := range outdated {
|
||||
Install(pkg, baseDir, conf, flags)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user