Skip to content
Permalink
Browse files
fix(run): --bash and --shell depend on image entrypoint
Signed-off-by: Alexey Igrychev <alexey.igrychev@flant.com>
  • Loading branch information
alexey-igrychev committed Sep 8, 2022
1 parent bc691f2 commit c2369f6041c7db78b5cb9a94640e9b25f23f34f8
Showing 1 changed file with 2 additions and 2 deletions.
@@ -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)

0 comments on commit c2369f6

Please sign in to comment.