From 750e553d48ce37420bb34f9ad61e62fc7e9c2f3a Mon Sep 17 00:00:00 2001 From: Hristo Iliev Date: Tue, 23 Apr 2024 12:12:15 +0300 Subject: [PATCH] Support Windows 10 and 11 On Windows 10/11 os.name is returned as `Windows 10` or `Windows 11` Therefore the platform check fails with: ``` java.lang.IllegalStateException: Unsupported combination of OS/arch: Windows 11/amd64 at com.bisnode.opa.configuration.OpaPlatform.getPlatform(OpaPlatform.java:46) ``` --- src/main/java/com/bisnode/opa/configuration/OpaPlatform.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/bisnode/opa/configuration/OpaPlatform.java b/src/main/java/com/bisnode/opa/configuration/OpaPlatform.java index 0705670..3a03003 100644 --- a/src/main/java/com/bisnode/opa/configuration/OpaPlatform.java +++ b/src/main/java/com/bisnode/opa/configuration/OpaPlatform.java @@ -28,8 +28,8 @@ public Path getExecutablePath(final Path rootPath, final String version) { } public static OpaPlatform getPlatform() { - final String osName = System.getProperty("os.name"); - final String osArch = System.getProperty("os.arch"); + final String osName = System.getProperty("os.name").toLowerCase(); + final String osArch = System.getProperty("os.arch").toLowerCase(); if (osName.contains("win")) { if (osArch.equals("amd64")) { return WINDOWS_AMD64;