diff --git a/README.md b/README.md index 0ce0788..926e686 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ The UUID may change when the system is reinstalled or as the virtual machine's e This method returns the same value for every user on the system. - ```javascript console.log(await machineId()); // a642d9e1-6063-4da7-8ea8-2298f989d01d ``` diff --git a/lib/index.ts b/lib/index.ts index d937be7..b23e95c 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,9 +1,10 @@ +import { platform } from 'os'; import { exec as processExec } from 'child_process'; export default class Machini { static machineId(): Promise { return new Promise((resolve, reject) => { - const platformName = process.platform; + const platformName = platform(); let execCommands = ''; if (platformName === 'win32') {