bugraoz93 commented on code in PR #53553:
URL: https://github.com/apache/airflow/pull/53553#discussion_r2217914802
##########
airflow-ctl/src/airflowctl/ctl/commands/version_command.py:
##########
@@ -25,7 +25,11 @@
@provide_api_client(kind=ClientKind.CLI)
def version_info(arg, api_client=NEW_API_CLIENT):
"""Get version information."""
- version_response = api_client.version.get()
- version_dict = version_response.model_dump()
- version_dict["airflowctl_version"] = airflowctl_version
- rich.print(version_dict)
+ try:
+ version_response = api_client.version.get()
+ version_dict = version_response.model_dump()
+ version_dict["airflowctl_version"] = airflowctl_version
Review Comment:
Thanks for the comments! I have updated with returning a non-zero exit code.
Additionally, in generic exceptions, I updated the code to return a non-zero
exit.
Also included the assigning of the `ctl` version beforehand and printing via
updating the same dict.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]