Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
set shell to false
Browse files Browse the repository at this point in the history
  • Loading branch information
vieux committed Aug 20, 2014
1 parent b0c6bc9 commit 034a15f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mesoslib/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package mesoslib

import (
"fmt"
"strings"

"code.google.com/p/goprotobuf/proto"
"github.com/Sirupsen/logrus"
Expand All @@ -11,6 +12,8 @@ import (
func (m *MesosLib) LaunchTask(offer *mesosproto.Offer, resources []*mesosproto.Resource, command, ID, image string) error {
m.Log.WithFields(logrus.Fields{"ID": ID, "command": command, "offerId": offer.Id, "dockerImage": image}).Info("Launching task...")

args := strings.Split(command, " ")

taskInfo := &mesosproto.TaskInfo{
Name: proto.String(fmt.Sprintf("volt-task-%s", ID)),
TaskId: &mesosproto.TaskID{
Expand All @@ -19,7 +22,9 @@ func (m *MesosLib) LaunchTask(offer *mesosproto.Offer, resources []*mesosproto.R
SlaveId: offer.SlaveId,
Resources: resources,
Command: &mesosproto.CommandInfo{
Value: &command,
Value: &args[0],
Arguments: args[1:],
Shell: proto.Bool(false),
},
}

Expand Down

0 comments on commit 034a15f

Please sign in to comment.