Fix handling of -- in parser

This commit is contained in:
morganamilo 2018-02-20 17:03:50 +00:00
parent 0dc94a2c31
commit 85a99198c3
No known key found for this signature in database
GPG Key ID: 6FE9E7996B0B082E
2 changed files with 6 additions and 0 deletions

2
cmd.go
View File

@ -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:]...)

View File

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