File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public enum Platform: Equatable {
16
16
case android
17
17
case darwin
18
18
case linux( LinuxFlavor )
19
+ case windows
19
20
20
21
/// Recognized flavors of linux.
21
22
public enum LinuxFlavor : Equatable {
@@ -27,6 +28,9 @@ public enum Platform: Equatable {
27
28
public static var currentPlatform = Platform . _findCurrentPlatform ( localFileSystem)
28
29
/// Attempt to match `uname` with recognized platforms.
29
30
public static func _findCurrentPlatform( _ fs: FileSystem ) -> Platform ? {
31
+ #if os(Windows)
32
+ return . windows
33
+ #else
30
34
guard let uname = try ? Process . checkNonZeroExit ( args: " uname " ) . spm_chomp ( ) . lowercased ( ) else { return nil }
31
35
switch uname {
32
36
case " darwin " :
@@ -36,6 +40,7 @@ public enum Platform: Equatable {
36
40
default :
37
41
return nil
38
42
}
43
+ #endif
39
44
}
40
45
41
46
public static func _findCurrentPlatformLinux( _ fs: FileSystem ) -> Platform ? {
You can’t perform that action at this time.
0 commit comments