fix WSL path check to be case insensitive
@@ -17,7 +17,6 @@ limitations under the License.
package docker
import (
- "bytes"
"context"
"errors"
"fmt"
@@ -171,8 +170,8 @@ func detectWsl() (bool, error) {
if err != nil {
return false, fmt.Errorf("read /proc/version: %w", err)
}
-
- if bytes.Contains(b, []byte("Microsoft")) {
+ str := strings.ToLower(string(b))
+ if strings.Contains(str, "microsoft") {
return true, nil
}
}
