@@ -23,7 +23,8 @@ function macosVersion(): string {
2323export function resolveOsRuntimeName ( ) : string {
2424 const platform = os . platform ( ) ;
2525 const release = os . release ( ) ;
26- const cacheKey = `${ platform } \0${ release } ` ;
26+ const type = os . type ( ) ;
27+ const cacheKey = `${ platform } \0${ type } \0${ release } ` ;
2728 const cached = cachedOsRuntimeNameByKey . get ( cacheKey ) ;
2829 if ( cached ) {
2930 return cached ;
@@ -32,10 +33,7 @@ export function resolveOsRuntimeName(): string {
3233 if ( platform === "darwin" ) {
3334 return `macos ${ macosVersion ( ) } ` ;
3435 }
35- if ( platform === "win32" ) {
36- return `windows ${ release } ` ;
37- }
38- return `${ platform } ${ release } ` ;
36+ return `${ type } ${ release } ` ;
3937 } ) ( ) ;
4038 cachedOsRuntimeNameByKey . set ( cacheKey , runtimeName ) ;
4139 return runtimeName ;
@@ -53,7 +51,15 @@ export function resolveOsSummary(): OsSummary {
5351 if ( cached ) {
5452 return cached ;
5553 }
56- const label = `${ resolveOsRuntimeName ( ) } (${ arch } )` ;
54+ const label = ( ( ) => {
55+ if ( platform === "darwin" ) {
56+ return `macos ${ macosVersion ( ) } (${ arch } )` ;
57+ }
58+ if ( platform === "win32" ) {
59+ return `windows ${ release } (${ arch } )` ;
60+ }
61+ return `${ platform } ${ release } (${ arch } )` ;
62+ } ) ( ) ;
5763 const summary = { platform, arch, release, label } ;
5864 cachedOsSummaryByKey . set ( cacheKey , summary ) ;
5965 return summary ;
0 commit comments