Merge pull request #713 from Microsoft/JSONInLocaleFix

condition the use of locale on the exitance of JSON
This commit is contained in:
Mohamed Hegazy
2014-09-22 09:37:01 -07:00

View File

@@ -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);
}