Ask if user wants to contunue right after askedit

This commit is contained in:
morganamilo committed 2018-04-11 20:23:43 +01:00
1 parent 06406d7cee
commit c75bfe4947
2 files changed
+2 -8

No files matched your search

+1 -1
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 {
+1 -7
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 {