Skip to content

Commit 449d60c

Browse files
committed
Don't crash on no args
1 parent e407780 commit 449d60c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/tsc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ namespace ts {
4949
}
5050

5151
export function executeCommandLine(args: string[]): void {
52-
if ((args[0].toLowerCase() === "--build") || (args[0].toLowerCase() === "-b")) {
52+
if (args.length > 0 && ((args[0].toLowerCase() === "--build") || (args[0].toLowerCase() === "-b"))) {
5353
return performBuild(createCompilerHost({}), createDiagnosticReporter(sys), args.slice(1), sys);
5454
}
5555

0 commit comments

Comments
 (0)