mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
condition the use of locale on the exitance of JSON
This commit is contained in:
parent
d2f4cd7d92
commit
218bcd8c1e
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user