grim/convey

Parents e9f522b69dea
Children c77346921bec
Fix the volume mount path and shellquote.Split the commandline args
--- a/docker/run.go Sat Jul 27 13:50:43 2019 -0500
+++ b/docker/run.go Sat Jul 27 14:15:34 2019 -0500
@@ -25,6 +25,7 @@
"strings"
"time"
+ "github.com/kballard/go-shellquote"
log "github.com/sirupsen/logrus"
"bitbucket.org/rw_grim/convey/command"
@@ -252,7 +253,7 @@
workspaceMount := fullEnv.Map(workSpace)
cmd.Append(
- "-v", rt.State.Workspace.Path()+":"+workspaceMount,
+ "-v", rt.State.Workspace.Volume()+":"+workspaceMount,
"-e", "CONVEY_WORKSPACE="+workspaceMount,
)
@@ -380,7 +381,12 @@
// append the command if we have one
if commandArg != "" {
- cmd.Append(commandArg)
+ args, err := shellquote.Split(commandArg)
+ if err != nil {
+ return err
+ }
+
+ cmd.Append(args...)
}
logger.Infof("running container with id %s", runID)