From 519014af3db15bbbaba3d46d1d452996d9f633a1 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Fri, 9 Feb 2018 03:34:29 +0000 Subject: [PATCH] Respect --noconfirm in config --- cmd.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd.go b/cmd.go index 0bd1e3cc..35e70f9a 100644 --- a/cmd.go +++ b/cmd.go @@ -664,9 +664,15 @@ func passToPacman(args *arguments) error { argArr = append(argArr, "pacman") argArr = append(argArr, cmdArgs.formatGlobals()...) + + if config.NoConfirm { + argArr = append(argArr, "--noconfirm") + } + argArr = append(argArr, args.formatArgs()...) argArr = append(argArr, args.formatTargets()...) + cmd = exec.Command(argArr[0], argArr[1:]...) cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr