From 6d06f1687d662e004111b5e6d791a9afea73a531 Mon Sep 17 00:00:00 2001 From: Jguer Date: Wed, 15 Feb 2017 02:00:20 +0000 Subject: [PATCH] Fixes #8. Now we'll only skip user interraction against deps on --noconfirm. --- aur/result.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aur/result.go b/aur/result.go index 41c8b8f2..6fe60430 100644 --- a/aur/result.go +++ b/aur/result.go @@ -141,17 +141,23 @@ func (a *Result) Install(flags []string) (finalmdeps []string, err error) { } } + var depArgs []string + if util.NoConfirm == true { + depArgs = []string{"--asdeps", "--noconfirm"} + } else { + depArgs = []string{"--asdeps"} + } // Repo dependencies if len(repoDeps) != 0 { - errR := pacman.Install(repoDeps, []string{"--asdeps", "--noconfirm"}) + errR := pacman.Install(repoDeps, depArgs) if errR != nil { return finalmdeps, errR } } - // Handle AUR dependencies first + // Handle AUR dependencies for _, dep := range aurQ { - finalmdepsR, errA := dep.Install([]string{"--asdeps", "--noconfirm"}) + finalmdepsR, errA := dep.Install(depArgs) finalmdeps = append(finalmdeps, finalmdepsR...) if errA != nil {