From 47ecf9d0b88724be424d57673a75aa956f578abc Mon Sep 17 00:00:00 2001 From: Maarten Merken Date: Thu, 6 Jun 2024 16:08:25 +0200 Subject: [PATCH] Issue 81: default to en_US locale when defaults call fails --- src/services/helperService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/helperService.ts b/src/services/helperService.ts index 6857fe4..d23109d 100644 --- a/src/services/helperService.ts +++ b/src/services/helperService.ts @@ -145,8 +145,9 @@ export class HelperService { }); cmd.on("close", code => { if (code !== 0) { - LogService.error(`uname exited with code ${code}`, "CoreService", true); - return reject(code); + LogService.error(`reading defaults exited with code ${code}, could not retrieve AppleLanguages`, "CoreService", true); + LogService.warning(`Defaulting to en_US`, "CoreService", true); + return resolve("en_US"); } try { const result = stdout