Fix bug with shellquote

This commit is contained in:
Dustin Pianalto 2020-06-02 20:10:00 -08:00
parent e258613f27
commit 8f5dc67697

View File

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