Revert "added shell command input to commands prepending shell"

This reverts commit bccc664b19.
This commit is contained in:
Christian Jantz 2018-04-28 17:43:42 +02:00
parent 35b5f4b34a
commit 281c69c6c6
3 changed files with 6 additions and 21 deletions

View File

@ -35,13 +35,8 @@ func (c *CmdCommand) ExecuteCommand(config *v1.Config) error {
var newCommand []string
if c.cmd.PrependShell {
// This is the default shell on Linux
var shell []string
if len(config.Shell) > 0 {
shell = config.Shell
} else {
shell = append(shell, "/bin/sh", "-c")
}
// TODO: Support shell command here
shell := []string{"/bin/sh", "-c"}
newCommand = append(shell, strings.Join(c.cmd.CmdLine, " "))
} else {
newCommand = c.cmd.CmdLine

View File

@ -34,13 +34,8 @@ func (e *EntrypointCommand) ExecuteCommand(config *v1.Config) error {
var newCommand []string
if e.cmd.PrependShell {
// This is the default shell on Linux
var shell []string
if len(config.Shell) > 0 {
shell = config.Shell
} else {
shell = append(shell, "/bin/sh", "-c")
}
// TODO: Support shell command here
shell := []string{"/bin/sh", "-c"}
newCommand = append(shell, strings.Join(e.cmd.CmdLine, " "))
} else {
newCommand = e.cmd.CmdLine

View File

@ -36,13 +36,8 @@ func (r *RunCommand) ExecuteCommand(config *v1.Config) error {
var newCommand []string
if r.cmd.PrependShell {
// This is the default shell on Linux
var shell []string
if len(config.Shell) > 0 {
shell = config.Shell
} else {
shell = append(shell, "/bin/sh", "-c")
}
// TODO: Support shell command here
shell := []string{"/bin/sh", "-c"}
newCommand = append(shell, strings.Join(r.cmd.CmdLine, " "))
} else {
newCommand = r.cmd.CmdLine