Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly show application version; execution of command with version option #1663

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

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
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
Projects
Status: PR 📬
Development

Successfully merging this pull request may close these issues.

--version not showing version when default command set
2 participants