2022-09-16 14:54:53 +02:00
|
|
|
diff -Nru azure-cli-core-2.40.0.orig/azure/cli/core/util.py azure-cli-core-2.40.0/azure/cli/core/util.py
|
|
|
|
--- azure-cli-core-2.40.0.orig/azure/cli/core/util.py 2022-09-02 07:40:04.000000000 +0200
|
|
|
|
+++ azure-cli-core-2.40.0/azure/cli/core/util.py 2022-09-16 11:13:11.938223294 +0200
|
|
|
|
@@ -485,19 +485,7 @@
|
2020-09-30 15:23:11 +02:00
|
|
|
|
|
|
|
|
2021-01-21 18:00:25 +01:00
|
|
|
def show_updates(updates_available_components, only_show_when_updates_available=False):
|
2020-09-30 15:23:11 +02:00
|
|
|
- if updates_available_components is None:
|
2021-01-08 13:07:53 +01:00
|
|
|
- if not only_show_when_updates_available:
|
|
|
|
- logger.warning('Unable to check if your CLI is up-to-date. Check your internet connection.')
|
2020-09-30 15:23:11 +02:00
|
|
|
- elif updates_available_components: # pylint: disable=too-many-nested-blocks
|
|
|
|
- if in_cloud_console():
|
2022-09-16 14:54:53 +02:00
|
|
|
- warning_msg = 'You have %i update(s) available. They will be updated with the next build of Cloud Shell.'
|
2020-09-30 15:23:11 +02:00
|
|
|
- else:
|
2022-09-16 14:54:53 +02:00
|
|
|
- warning_msg = "You have %i update(s) available."
|
2020-09-30 15:23:11 +02:00
|
|
|
- if CLI_PACKAGE_NAME in updates_available_components:
|
|
|
|
- warning_msg = "{} Consider updating your CLI installation with 'az upgrade'".format(warning_msg)
|
|
|
|
- logger.warning(warning_msg, len(updates_available_components))
|
2021-01-08 13:07:53 +01:00
|
|
|
- elif not only_show_when_updates_available:
|
2020-09-30 15:23:11 +02:00
|
|
|
- print('Your CLI is up-to-date.')
|
|
|
|
+ return
|
|
|
|
|
2022-09-16 14:54:53 +02:00
|
|
|
|
2020-09-30 15:23:11 +02:00
|
|
|
def get_json_object(json_string):
|