Ask if user wants to contunue right after askedit

This commit is contained in:
morganamilo 2018-04-11 16:47:00 +01:00
parent 06406d7cee
commit c75bfe4947
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E
2 changed files with 2 additions and 8 deletions

View file

@ -225,7 +225,7 @@ func continueTask(s string, def string) (cont bool) {
}
var response string
fmt.Print(bold(green(arrow)+" "+s+" "), bold(postFix))
fmt.Print(bold(green(arrow)+" "+s), bold(postFix))
n, err := fmt.Scanln(&response)
if err != nil || n == 0 {

View file

@ -173,6 +173,7 @@ func install(parser *arguments) error {
if err != nil {
return err
}
cleanBuilds(toClean)
err = downloadPkgBuilds(dc.Aur, parser.targets, dc.Bases)
@ -232,13 +233,6 @@ func install(parser *arguments) error {
return fmt.Errorf("%s%s", stderr, err)
}
}
} else if hasAur {
oldValue := config.NoConfirm
config.NoConfirm = false
if len(toEdit) > 0 && !continueTask("Proceed with install?", "nN") {
return fmt.Errorf("Aborting due to user")
}
config.NoConfirm = oldValue
}
if hasAur {