Small fixes [release]

This commit is contained in:
crschnick
2023-03-30 10:06:25 +00:00
parent 56234f2abf
commit 7fd2e89c77
5 changed files with 33 additions and 17 deletions

View File

@@ -60,8 +60,8 @@ public interface OsType {
@Override
public String determineOperatingSystemName(ShellControl pc) throws Exception {
var properties = getProperties(pc);
return properties.get("OS Name") + " "
+ properties.get("OS Version").split(" ")[0];
return properties.getOrDefault("OS Name", "Windows") + " "
+ properties.getOrDefault("OS Version", "?").split(" ")[0];
}
}