From 9a1ff006e713b8cf654b990c75e6cd67a4bbdc5b Mon Sep 17 00:00:00 2001 From: Dan Pantry Date: Thu, 22 Feb 2024 18:25:55 -0800 Subject: [PATCH] Defualt to Bash even if we're in Windows. --- cli/credentials.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/credentials.go b/cli/credentials.go index 420bda0a..b460c964 100644 --- a/cli/credentials.go +++ b/cli/credentials.go @@ -23,9 +23,13 @@ const ( func getShellType() ShellType { pid := os.Getppid() parentProc, _ := ps.FindProcess(pid) - normalizedName := strings.ToLower(parentProc.Executable()) + name := strings.ToLower(parentProc.Executable()) - if strings.Contains(normalizedName, "powershell") || strings.Contains(normalizedName, "pwsh") { + if strings.Contains(name, "bash") || strings.Contains(name, "zsh") || strings.Contains(name, "ash") { + return shellTypeBash + } + + if strings.Contains(name, "powershell") || strings.Contains(name, "pwsh") { return shellTypePowershell }