From 58e1db58b17f24779dd7c7f69810bb2fdf5a3828 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Fri, 1 Mar 2024 16:59:47 +0100 Subject: [PATCH] Fixed building Python artifacts on Windows with WSL (#1249) ## Changes Fixed building Python artifacts on Windows with WSL Fixes #1243 --- libs/exec/shell_bash.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/exec/shell_bash.go b/libs/exec/shell_bash.go index bb8c6c51..9f6b508f 100644 --- a/libs/exec/shell_bash.go +++ b/libs/exec/shell_bash.go @@ -34,8 +34,12 @@ func newBashShell() (shell, error) { return nil, nil } + // Convert to lowercase for case-insensitive comparison + // Some systems may return some parts of the path in uppercase. + outLower := strings.ToLower(out) // Skipping WSL bash if found one - if strings.Contains(out, `\Windows\System32\bash.exe`) || strings.Contains(out, `\Microsoft\WindowsApps\bash.exe`) { + if strings.Contains(outLower, `\windows\system32\bash.exe`) || + strings.Contains(outLower, `\microsoft\windowsapps\bash.exe`) { return nil, nil }