Skip to content

Commit ec24d65

Browse files
alegacycfergeau
authored andcommitted
Issue #4279 Fix case sensitive WSL2 validation check
The WSL validation check assumes that the name "Microsoft" is capitalized but this is not true in all cases. Signed-off-by: Allain Legacy <alegacy@redhat.com>
1 parent 71b8eb6 commit ec24d65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/crc/preflight/preflight_checks_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func checkRunningInsideWSL2() error {
3636
return err
3737
}
3838

39-
if strings.Contains(string(version), "Microsoft") {
39+
if strings.Contains(strings.ToLower(string(version)), "microsoft") {
4040
logging.Debugf("Running inside WSL2 environment")
4141
return fmt.Errorf("CRC is unsupported using WSL2")
4242
}

0 commit comments

Comments
 (0)