Skip to content

Commit

Permalink
Issue #4279 Fix case sensitive WSL2 validation check
Browse files Browse the repository at this point in the history
The WSL validation check assumes that the name "Microsoft" is
capitalized but this is not true in all cases.

Signed-off-by: Allain Legacy <[email protected]>
  • Loading branch information
alegacy authored and cfergeau committed Jul 24, 2024
1 parent 71b8eb6 commit ec24d65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/crc/preflight/preflight_checks_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func checkRunningInsideWSL2() error {
return err
}

if strings.Contains(string(version), "Microsoft") {
if strings.Contains(strings.ToLower(string(version)), "microsoft") {
logging.Debugf("Running inside WSL2 environment")
return fmt.Errorf("CRC is unsupported using WSL2")
}
Expand Down

0 comments on commit ec24d65

Please sign in to comment.