Skip to content

"Intl.DateTimeFormat().resolvedOptions().locale" returns different values in extension host to VS Code process #85675

@DanTup

Description

@DanTup

I'm using MacBook with its system language set to en-GB. I launched VS Code (from the dock, not the terminal) and if I run:

Intl.DateTimeFormat().resolvedOptions().locale

in the Chrome dev tools console, I see this:

Screenshot 2019-11-27 at 9 23 00 am

However, in an extension's activate function if I do this:

console.log(Intl.DateTimeFormat().resolvedOptions().locale);

Then I see this:

Screenshot 2019-11-27 at 9 23 44 am

I need to get the system language in order to set the LANG env variable for spawned processes because CocoaPods crashes if LANG is not set to something-UTF-8, and there's no way to set it without a language part so I need to get at the system language.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberelectronIssues and items related to ElectronmacosIssues with VS Code on MAC/OS XupstreamIssue identified as 'upstream' component related (exists outside of VS Code)wont-fix

Type

No type

Projects

Status

✔️ Done / Deferred

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions