diff --git a/cmd.go b/cmd.go index 7642a772..d603a77c 100644 --- a/cmd.go +++ b/cmd.go @@ -699,6 +699,8 @@ func passToPacman(args *arguments) error { argArr = append(argArr, "--noconfirm") } + argArr = append(argArr, "--") + argArr = append(argArr, args.formatTargets()...) cmd = exec.Command(argArr[0], argArr[1:]...) diff --git a/parser.go b/parser.go index 765edab0..58bb3398 100644 --- a/parser.go +++ b/parser.go @@ -270,6 +270,10 @@ func (parser *arguments) formatArgs() (args []string) { args = append(args, op) for option, arg := range parser.options { + if option == "--" { + continue + } + formatedOption := formatArg(option) args = append(args, formatedOption)