Respect --noconfirm in config

This commit is contained in:
morganamilo 2018-02-09 03:34:29 +00:00
parent 0f0100b4d0
commit 519014af3d
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E

6
cmd.go
View file

@ -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