Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
bebound committed Jan 17, 2025
1 parent 5103af8 commit 2da23e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/azure-cli-core/azure/cli/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,11 +1284,14 @@ def handle_version_update():
because of a version update of Azure CLI
"""
try:
import datetime
from azure.cli.core._session import VERSIONS
from packaging.version import parse # pylint: disable=import-error,no-name-in-module
from azure.cli.core import __version__
if not VERSIONS['versions']:
get_cached_latest_versions()
versions = _get_local_versions()
VERSIONS['versions'] = versions
VERSIONS[_VERSION_UPDATE_TIME] = str(datetime.datetime.now())
elif parse(VERSIONS['versions']['core']['local']) != parse(__version__):
logger.debug("Azure CLI has been updated.")
logger.debug("Clean up versions and refresh cloud endpoints information in local files.")
Expand Down

0 comments on commit 2da23e8

Please sign in to comment.