Skip to content

Commit

Permalink
Test for grammars not being found only, when parameters were given.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-lischke committed Dec 29, 2024
1 parent bdc4607 commit a6094e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Tool implements ITool {
this.grammarFiles = this.toolParameters.args;
this.errorManager = new ErrorManager(this.toolParameters.msgFormat, this.toolParameters.longMessages,
this.toolParameters.warningsAreErrors);
if (this.grammarFiles.length === 0) {
if (args && args.length > 0 && this.grammarFiles.length === 0) {
this.errorManager.toolError(ErrorType.NO_GRAMMARS_FOUND);
}
}
Expand Down

0 comments on commit a6094e7

Please sign in to comment.