Ask if user wants to contunue right after askedit
This commit is contained in:
2 files changed
+2
-8
No files matched your search
@@ -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
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user