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);
6
6
7
7
import { logError } from './errors' ;
8
8
9
- export async function getDeviceDetails ( ) {
9
+ export async function getDeviceDetails ( ) : Promise < {
10
+ platform : string ;
11
+ release : string ;
12
+ runtimeArch : string ;
13
+ realArch : string ;
14
+ } > {
10
15
const [
11
16
realArch ,
12
17
osDetails
@@ -33,7 +38,7 @@ async function getOsDetails() {
33
38
// For Windows, the version numbers are oddly precise and weird. We simplify:
34
39
return {
35
40
platform : rawPlatform ,
36
- version : getWindowsVersion ( )
41
+ release : getWindowsVersion ( )
37
42
} ;
38
43
} else {
39
44
return {
@@ -81,13 +86,13 @@ async function getLinuxOsDetails() {
81
86
82
87
return {
83
88
platform : osRelease [ 'ID' ] || osRelease [ 'NAME' ] || 'linux' ,
84
- version : majorMinorOnly ( osRelease [ 'VERSION_ID' ] || os . release ( ) )
89
+ release : majorMinorOnly ( osRelease [ 'VERSION_ID' ] || os . release ( ) )
85
90
} ;
86
91
} catch ( e ) {
87
92
logError ( `Failed to detect Linux version: ${ e . message } ` ) ;
88
93
return {
89
94
platform : 'linux' ,
90
- version : majorMinorOnly ( os . release ( ) )
95
+ release : majorMinorOnly ( os . release ( ) )
91
96
} ;
92
97
}
93
98
}
You can’t perform that action at this time.
0 commit comments