10000 Merge pull request #713 from Microsoft/JSONInLocaleFix · johnangularjs/TypeScript@d38b080 · GitHub
[go: up one dir, main page]

Skip to content

Commit d38b080

Browse files
committed
Merge pull request microsoft#713 from Microsoft/JSONInLocaleFix
condition the use of locale on the exitance of JSON
2 parents d2f4cd7 + 218bcd8 commit d38b080

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/compiler/tsc.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ module ts {
201201
var commandLine = parseCommandLine(args);
202202

203203
if (commandLine.options.locale) {
204+
if (typeof JSON === "undefined") {
205+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.The_current_host_does_not_support_the_0_option, "--locale"));
206+
return sys.exit(1);
207+
}
208+
204209
validateLocaleAndSetLanguage(commandLine.options.locale, commandLine.errors);
205210
}
206211

0 commit comments

Comments
 (0)
0