From 8880bc899ffe9f0933c813f9ed2093f866caf1c2 Mon Sep 17 00:00:00 2001 From: leejooy96 Date: Wed, 3 Apr 2024 14:59:04 +0900 Subject: [PATCH] fix: failed to get machine id on windows --- lib/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index 9671786..f1775f2 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -29,7 +29,7 @@ export default class Machini { return; } - const output = stdout.split('\r\n')?.[0] || ''; + const output = (platformName === 'win32') ? stdout : (stdout.split('\r\n')?.[0] || ''); if (extractRegex) { const extractOutput = extractRegex.exec(output)?.[1];