diff --git a/cmd/minikube/cmd/docker-env.go b/cmd/minikube/cmd/docker-env.go index c4432c6b5825..9d8914a2d731 100644 --- a/cmd/minikube/cmd/docker-env.go +++ b/cmd/minikube/cmd/docker-env.go @@ -27,6 +27,8 @@ import ( "strconv" "strings" + lib_shell "github.com/docker/machine/libmachine/shell" + "github.com/golang/glog" "github.com/spf13/cobra" "k8s.io/minikube/pkg/drivers/kic/oci" "k8s.io/minikube/pkg/minikube/command" @@ -168,7 +170,14 @@ var dockerEnvCmd = &cobra.Command{ if ec.Shell == "" { ec.Shell, err = shell.Detect() if err != nil { - exit.WithError("Error detecting shell", err) + // if we can't detect it could be bash. for example github actions + if err == lib_shell.ErrUnknownShell { + ec.Shell = "bash" + glog.Warningf("couldn't detect shell type, will default to bash: %v", err) + } else { + exit.WithError("Error detecting shell", err) + } + } }