Skip to content

Commit

Permalink
fix(run): --bash and --shell depend on image entrypoint
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Igrychev <alexey.igrychev@flant.com>
  • Loading branch information
alexey-igrychev committed Sep 8, 2022
1 parent bc691f2 commit c2369f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/werf/run/run.go
Expand Up @@ -95,11 +95,11 @@ func NewCmd(ctx context.Context) *cobra.Command {
if len(cmdData.DockerOptions) == 0 && len(cmdData.DockerCommand) == 0 {
cmdData.DockerOptions = []string{"-ti", "--rm"}
if cmdData.Shell {
cmdData.DockerCommand = []string{"/bin/sh"}
cmdData.DockerOptions = append(cmdData.DockerOptions, "--entrypoint=/bin/sh")
}

if cmdData.Bash {
cmdData.DockerCommand = []string{"/bin/bash"}
cmdData.DockerOptions = append(cmdData.DockerOptions, "--entrypoint=/bin/bash")
}
} else {
common.PrintHelp(cmd)
Expand Down

0 comments on commit c2369f6

Please sign in to comment.