File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed 
Cli/Microsoft.DotNet.Cli.Utils Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ internal enum Platform
1111        Darwin  =  3 , 
1212        FreeBSD  =  4 , 
1313        illumos  =  5 , 
14-         Solaris  =  6 
14+         Solaris  =  6 , 
15+         Haiku  =  7 
1516    } 
1617
1718    internal  static   class  RuntimeEnvironment 
@@ -45,6 +46,8 @@ private static string GetOSName()
4546                    return  GetDistroId ( )  ??  nameof ( Platform . illumos ) ; 
4647                case  Platform . Solaris : 
4748                    return  nameof ( Platform . Solaris ) ; 
49+                 case  Platform . Haiku : 
50+                     return  nameof ( Platform . Haiku ) ; 
4851                default : 
4952                    return  nameof ( Platform . Unknown ) ; 
5053            } 
@@ -67,6 +70,8 @@ private static string GetOSVersion()
6770                    // RuntimeInformation.OSDescription example on Solaris 11.3:      SunOS 5.11 11.3 
6871                    // we only need the major version; 11 
6972                    return  RuntimeInformation . OSDescription . Split ( ' ' ) [ 2 ] . Split ( '.' ) [ 0 ] ; 
73+                 case  Platform . Haiku : 
74+                     return  Environment . OSVersion . Version . ToString ( 1 ) ; 
7075                default : 
7176                    return  string . Empty ; 
7277            } 
@@ -251,6 +256,10 @@ private static Platform DetermineOSPlatform()
251256            { 
252257                return  Platform . Solaris ; 
253258            } 
259+             if  ( RuntimeInformation . IsOSPlatform ( OSPlatform . Create ( "HAIKU" ) ) ) 
260+             { 
261+                 return  Platform . Haiku ; 
262+             } 
254263#endif
255264
256265            return  Platform . Unknown ; 
Original file line number Diff line number Diff line change 6464        " unix-x64" 
6565      ]
6666    },
67+     "haiku" : {
68+       "#import" : [
69+         " unix" 
70+       ]
71+     },
72+     "haiku-x64" : {
73+       "#import" : [
74+         " haiku"  ,
75+         " unix-x64" 
76+       ]
77+     },
6778    "illumos" : {
6879      "#import" : [
6980        " unix" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments