File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ const execAsync = promisify(exec);
66
77import { logError } from './errors' ;
88
9- export async function getDeviceDetails ( ) {
9+ export async function getDeviceDetails ( ) : Promise < {
10+ platform : string ;
11+ release : string ;
12+ runtimeArch : string ;
13+ realArch : string ;
14+ } > {
1015 const [
1116 realArch ,
1217 osDetails
@@ -33,7 +38,7 @@ async function getOsDetails() {
3338 // For Windows, the version numbers are oddly precise and weird. We simplify:
3439 return {
3540 platform : rawPlatform ,
36- version : getWindowsVersion ( )
41+ release : getWindowsVersion ( )
3742 } ;
3843 } else {
3944 return {
@@ -81,13 +86,13 @@ async function getLinuxOsDetails() {
8186
8287 return {
8388 platform : osRelease [ 'ID' ] || osRelease [ 'NAME' ] || 'linux' ,
84- version : majorMinorOnly ( osRelease [ 'VERSION_ID' ] || os . release ( ) )
89+ release : majorMinorOnly ( osRelease [ 'VERSION_ID' ] || os . release ( ) )
8590 } ;
8691 } catch ( e ) {
8792 logError ( `Failed to detect Linux version: ${ e . message } ` ) ;
8893 return {
8994 platform : 'linux' ,
90- version : majorMinorOnly ( os . release ( ) )
95+ release : majorMinorOnly ( os . release ( ) )
9196 } ;
9297 }
9398}
You can’t perform that action at this time.
0 commit comments