Revert "docker-env: fall back to bash if can not detect shell."

pull/7894/head
Medya Ghazizadeh 2020-04-24 14:25:15 -07:00 committed by GitHub
parent b69ebd1231
commit 0ea84f9d14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 10 deletions

View File

@ -27,8 +27,6 @@ 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"
@ -170,14 +168,7 @@ var dockerEnvCmd = &cobra.Command{
if ec.Shell == "" {
ec.Shell, err = shell.Detect()
if err != nil {
// 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)
}
exit.WithError("Error detecting shell", err)
}
}