[PR #9495] Invalidate nested command with no valid subcommands #27606

Open
opened 2026-01-31 09:22:57 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/9495

State: closed
Merged: Yes


Currently, when loading command with sub-commands that fail to parse,
we result with command that:

  • Is not considered nested (has no sub-commands)
  • Has no action of its own

The commit contains a few changes:

  1. Protection in the dispatch that will prevent NPE
  2. Change in the command parsing that will no load
    a command if all its sub-commands failed to parse
  3. We will add a warning in this case (the solution is somewhat
    hacky, due to the hack that was there previously)

When such command is passed to a dispatch we crash with NPE.

Closes #9448

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9495 **State:** closed **Merged:** Yes --- Currently, when loading command with sub-commands that fail to parse, we result with command that: * Is not considered nested (has no sub-commands) * Has no action of its own The commit contains a few changes: 1. Protection in the dispatch that will prevent NPE 2. Change in the command parsing that will no load a command if all its sub-commands failed to parse 3. We will add a warning in this case (the solution is somewhat hacky, due to the hack that was there previously) When such command is passed to a dispatch we crash with NPE. Closes #9448
claunia added the pull-request label 2026-01-31 09:22:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27606