Skip to content

Commit

Permalink
fix: split command for compose run (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
cszatmary authored Jan 27, 2021
1 parent d74457c commit d5165ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package docker
import (
"fmt"
"strconv"
"strings"

"github.com/TouchBistro/goutils/command"
"github.com/TouchBistro/tb/config"
Expand Down Expand Up @@ -59,7 +60,8 @@ func ComposeRm(services []string) error {
}

func ComposeRun(serviceName, cmd string) error {
return execDockerCompose("run", "--rm", serviceName, cmd)
args := append([]string{"--rm", serviceName}, strings.Fields(cmd)...)
return execDockerCompose("run", args...)
}

func execDockerCompose(subcmd string, args ...string) error {
Expand Down

0 comments on commit d5165ea

Please sign in to comment.