Skip to content

[BUG] Command with -v displays AppVersion instead of executing the command. #1400

@JKamsker

Description

@JKamsker

Information

  • OS: Windows 11
  • Spectre Version: 0.47.1-preview.0.26
  • Terminal: WT

Describe the bug
A regression occurred in Spectre.Console version 0.47.1-preview.0.26 where the command option "-v" is now being misinterpreted as a request for version information within command settings, rather than being recognized as a command argument, which was the correct behavior in version 0.47.1-preview.0.17.

To Reproduce

  1. Create a command with a "-v" option in its settings.
  2. Execute the command with the "-v" option followed by a value (e.g., app command -v 1.2.3).
  3. The application displays version information instead of executing the command.

Expected behavior
The command should execute as intended when the "-v" option is provided, as it did in version 0.47.1-preview.0.17.

Actual Behavior
Starting from version 0.47.1-preview.0.26, the application displays the version information and the command is not executed.

Additional context
The PR #1399 tests this bug. When fixed, the test should succeed. (Failure happens in Test Run )

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions