Skip to content

Commit

Permalink
fix: Add more context to comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hampuslavin committed Nov 18, 2024
1 parent 6fd60b1 commit 1e4f143
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/better_command_runner/better_command_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ class BetterCommandRunner extends CommandRunner {
// which will be caught in the try catch around the super.runCommand call.
// Therefore, this ensures that the help event is not sent for
// commands that are invalid.
// Note that there are other scenarios that also trigger a [UsageException]
// so the try/catch statement can't be fully compensated for handled here.
var noUnexpectedArgs = topLevelResults.rest.isEmpty;
if (noUnexpectedArgs) {
_onAnalyticsEvent?.call(BetterCommandRunnerAnalyticsEvents.help);
Expand Down

0 comments on commit 1e4f143

Please sign in to comment.