Fix bug with shellquote

pull/1/head
DustyP 6 years ago
parent e258613f27
commit 8f5dc67697

@ -11,10 +11,9 @@ import (
"github.com/kballard/go-shellquote" "github.com/kballard/go-shellquote"
) )
func addTagCommand(ctx disgoman.Context, args []string) { func addTagCommand(ctx disgoman.Context, input []string) {
if len(args) >= 1 { if len(input) >= 1 {
fmt.Println(args) args, err := shellquote.Split(strings.Join(input, " "))
args, err := shellquote.Split(strings.Join(args, " "))
if err != nil { if err != nil {
if strings.Contains(err.Error(), "Unterminated") { if strings.Contains(err.Error(), "Unterminated") {
args = strings.SplitN(strings.Join(args, " "), " ", 2) args = strings.SplitN(strings.Join(args, " "), " ", 2)

Loading…
Cancel
Save