Skip to content

Commit f9fec02

Browse files
committed
Align device info fields with themselves & prev version
1 parent 0f5a91d commit f9fec02

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/device.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ const execAsync = promisify(exec);
66

77
import { 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
}

0 commit comments

Comments
 (0)