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 {
1616 case android
1717 case darwin
1818 case linux( LinuxFlavor )
19+ case windows
1920
2021 /// Recognized flavors of linux.
2122 public enum LinuxFlavor : Equatable {
@@ -27,6 +28,9 @@ public enum Platform: Equatable {
2728 public static var currentPlatform = Platform . _findCurrentPlatform ( localFileSystem)
2829 /// Attempt to match `uname` with recognized platforms.
2930 public static func _findCurrentPlatform( _ fs: FileSystem ) -> Platform ? {
31+ #if os(Windows)
32+ return . windows
33+ #else
3034 guard let uname = try ? Process . checkNonZeroExit ( args: " uname " ) . spm_chomp ( ) . lowercased ( ) else { return nil }
3135 switch uname {
3236 case " darwin " :
@@ -36,6 +40,7 @@ public enum Platform: Equatable {
3640 default :
3741 return nil
3842 }
43+ #endif
3944 }
4045
4146 public static func _findCurrentPlatformLinux( _ fs: FileSystem ) -> Platform ? {
You can’t perform that action at this time.
0 commit comments