mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
condition the use of locale on the exitance of JSON
This commit is contained in:
@@ -201,6 +201,11 @@ module ts {
|
||||
var commandLine = parseCommandLine(args);
|
||||
|
||||
if (commandLine.options.locale) {
|
||||
if (typeof JSON === "undefined") {
|
||||
reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_current_host_does_not_support_the_0_option, "--locale"));
|
||||
return sys.exit(1);
|
||||
}
|
||||
|
||||
validateLocaleAndSetLanguage(commandLine.options.locale, commandLine.errors);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user