microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.94k stars 598 forks source link

[rush] Support `--version` cli flag #4949

Open viceice opened 1 month ago

viceice commented 1 month ago

Summary

We're dynamically install tools for renovate and for simple test we call <tool> --version which works for most tools. It would be nice if rush can support this too. It should simply print the version and exit with zero code.

https://github.com/containerbase/base/blob/61fc48fbabe852b4a25a19890e72bab02fe5658c/src/cli/tools/node/utils.ts#L190

Details

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/rush globally installed version? 5.136.1
rushVersion from rush.json?
useWorkspaces from rush.json?
Operating system? Linux
Would you consider contributing a PR? Yes
Node.js version (node -v)? 20.17.0
iclanton commented 1 month ago

Do you want to get the current version of Rush by running rush --version? Or do you want to get the currently installed version of a particular package?

viceice commented 1 month ago

Do you want to get the current version of Rush by running rush --version? Or do you want to get the currently installed version of a particular package?

the rush cli version which is running. 🤗