From 2bf310d37caff8dcd59f01225ef9781f2145258e Mon Sep 17 00:00:00 2001 From: morganamilo Date: Sat, 12 May 2018 00:12:33 +0100 Subject: [PATCH] Fix --ignore flag while skipping updates If --ignore was specified on the command line and the user skips packages using the number menu, packages would not be properly skipped because they the manual --ignore would overide the --ignore from the menu. Now correctly combine both --ignore flags into a single combined flag when passing to pacman. --- install.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.go b/install.go index 2188afe2..657e04df 100644 --- a/install.go +++ b/install.go @@ -114,7 +114,13 @@ func install(parser *arguments) error { requestTargets = append(requestTargets, up) } - arguments.addParam("ignore", strings.Join(ignore.toSlice(), ",")) + value, _, exists := cmdArgs.getArg("ignore") + ignoreStr := strings.Join(ignore.toSlice(), ",") + if exists { + ignoreStr += "," + value + } + + arguments.options["ignore"] = ignoreStr fmt.Println() for pkg := range aurUp {