Skip to content

Commit

Permalink
Issue 81: default to en_US locale when defaults call fails
Browse files Browse the repository at this point in the history
  • Loading branch information
merken committed Jun 6, 2024
1 parent 8ab0983 commit 47ecf9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/helperService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47ecf9d

Please sign in to comment.