We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdb84aa commit 6fc09f3Copy full SHA for 6fc09f3
Sources/TSCUtility/Platform.swift
@@ -20,6 +20,7 @@ public enum Platform {
20
/// Recognized flavors of linux.
21
public enum LinuxFlavor {
22
case debian
23
+ case fedora
24
}
25
26
/// Lazily checked current platform.
@@ -38,6 +39,11 @@ public enum Platform {
38
39
localFileSystem.isFile(AbsolutePath("/system/bin/toybox")) {
40
return .android
41
42
+ if localFileSystem.isFile(AbsolutePath("/etc/redhat-release")) ||
43
+ localFileSystem.isFile(AbsolutePath("/etc/centos-release")) ||
44
+ localFileSystem.isFile(AbsolutePath("/etc/fedora-release")) {
45
+ return .linux(.fedora)
46
+ }
47
default:
48
return nil
49
0 commit comments