Merge pull request #142 from Morganamilo/fix#122

Respect --noconfirm in config
This commit is contained in:
J Guerreiro 2018-02-09 09:52:00 +00:00 committed by GitHub
commit 20128f4776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
cmd.go
View File

@ -664,6 +664,11 @@ func passToPacman(args *arguments) error {
argArr = append(argArr, config.PacmanBin)
argArr = append(argArr, cmdArgs.formatGlobals()...)
if config.NoConfirm {
argArr = append(argArr, "--noconfirm")
}
argArr = append(argArr, args.formatArgs()...)
if config.NoConfirm {
argArr = append(argArr, "--noconfirm")
@ -671,6 +676,7 @@ func passToPacman(args *arguments) error {
argArr = append(argArr, args.formatTargets()...)
cmd = exec.Command(argArr[0], argArr[1:]...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr