Skip to content

Commit 4927e41

Browse files
committed
fix: map "darwin" agents as macOS
1 parent 2d2403d commit 4927e41

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
- workspaces and agents are now resolved and displayed progressively
1313

1414
### Fixed
15-
- icon rendering on macOS
15+
- icon rendering on `macOS`
16+
- `darwin` agents are now recognized as `macOS`
1617

1718
## 2.1.3 - 2022-12-09
1819

src/main/kotlin/com/coder/gateway/sdk/os.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package com.coder.gateway.sdk
22

3+
import java.util.Locale
4+
35
fun getOS(): OS? {
46
return OS.from(System.getProperty("os.name"))
57
}
68

79
fun getArch(): Arch? {
8-
return Arch.from(System.getProperty("os.arch").toLowerCase())
10+
return Arch.from(System.getProperty("os.arch").lowercase(Locale.getDefault()))
911
}
1012

1113
enum class OS {
@@ -22,7 +24,7 @@ enum class OS {
2224
LINUX
2325
}
2426

25-
os.contains("mac", true) -> {
27+
os.contains("mac", true) || os.contains("darwin", true) -> {
2628
MAC
2729
}
2830

0 commit comments

Comments
 (0)