Skip to content

Conversation

@FrankRay78
Copy link
Contributor

@FrankRay78 FrankRay78 commented Oct 9, 2024

This PR is part of a series of CLI bug fixes/enhancements intended to be released prior to Spectre.Console V1.0

They should be individually reviewed and merged (and then the open ones rebased) in the following order, given they have been successively branched from each other (Rationale: earlier changes, particularly to CommandExecutor, are relied upon later). Separate PRs should aid the reviewer.

  1. Add parsed unknown flag to remaining arguments for a branch with a default command #1660
  2. Correctly show application version; execution of command with version option #1663 (this one)
  3. Help output correctly decides when to show the version option #1664

fixes #1216

  • I have read the Contribution Guidelines
  • I have commented on the issue above and discussed the intended changes
  • A maintainer has signed off on the changes and the issue was assigned to me
  • All newly added code is adequately covered by tests
  • All existing tests are still running without errors
  • The documentation was modified to reflect the changes OR no documentation changes are required.

Changes

  • Displays the application version (if configured) when a version flag is the first command line argument, even if a default command has been set.
  • When a command with a version option in the settings is set as the application default command, then execute this command instead of displaying the explicitly set Application Version.

Please upvote 👍 this pull request if you are interested in it.

@FrankRay78 FrankRay78 self-assigned this Oct 9, 2024
@FrankRay78 FrankRay78 added bug Something isn't working area-CLI Command-Line Interface labels Oct 9, 2024
@FrankRay78 FrankRay78 added this to the 0.50 milestone Oct 9, 2024
@FrankRay78 FrankRay78 requested a review from a team October 9, 2024 09:44
@FrankRay78 FrankRay78 changed the title Display version even when default command set Correctly show application version +/ execution of command with version option Oct 11, 2024
@FrankRay78
Copy link
Contributor Author

Fully implemented and ready for review

Important: Please see the comment at the top of the issue description ahead of merging.

@FrankRay78 FrankRay78 changed the title Correctly show application version +/ execution of command with version option Correctly show application version; execution of command with version option Oct 14, 2024
@patriksvensson patriksvensson modified the milestones: 0.50, 0.51 Nov 13, 2024
@github-actions github-actions bot added the ⭐ top pull request Top pull request. label Feb 20, 2025
@patriksvensson patriksvensson removed this from the 0.51 milestone Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CLI Command-Line Interface bug Something isn't working ⭐ top pull request Top pull request.

Projects

Status: PR 📬

Development

Successfully merging this pull request may close these issues.

--version not showing version when default command set

2 participants