Fixed building Python artifacts on Windows with WSL (#1249)

## Changes
Fixed building Python artifacts on Windows with WSL

Fixes #1243
This commit is contained in:
Andrew Nester 2024-03-01 16:59:47 +01:00 committed by GitHub
parent e1407038d3
commit 58e1db58b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -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
}