From 69de873fce31433382b4f7a6e3430a3ba256d980 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Fri, 1 Mar 2024 13:18:34 +0100 Subject: [PATCH] Fixed building Python artifacts on Windows with WSL --- 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 bb8c6c514f..9f6b508f4d 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 }