From c4dd9198c1c3c8faa10af824bcc21e7c7efe7243 Mon Sep 17 00:00:00 2001 From: Evan Hazlett Date: Tue, 5 May 2015 12:19:53 -0700 Subject: [PATCH] windows: fix shell detection to not bail on bash envs Signed-off-by: Evan Hazlett --- commands/commands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/commands.go b/commands/commands.go index 06736be40c..795d066315 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -611,8 +611,8 @@ func getCertPathInfo(c *cli.Context) libmachine.CertPathInfo { func detectShell() (string, error) { // attempt to get the SHELL env var shell := filepath.Base(os.Getenv("SHELL")) - // none detected; check for windows env - if runtime.GOOS == "windows" { + // none detected; check for windows env and not bash (i.e. msysgit, etc) + if runtime.GOOS == "windows" && shell == "" { log.Printf("On Windows, please specify either 'cmd' or 'powershell' with the --shell flag.\n\n") return "", ErrUnknownShell }