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

init colorama in az --version to fix issue on windows #11609

Merged
merged 5 commits into from
Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/azure-cli-core/azure/cli/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def get_cli_version(self):
def show_version(self):
from azure.cli.core.util import get_az_version_string
from azure.cli.core.commands.constants import SURVEY_PROMPT
import colorama
ver_string, updates_available = get_az_version_string()
print(ver_string)
if updates_available == -1:
Expand All @@ -97,7 +98,9 @@ def show_version(self):
else:
print('Your CLI is up-to-date.')

colorama.init() # This could be removed when knack fix is released
print('\n' + SURVEY_PROMPT)
colorama.deinit() # This could be removed when knack fix is released

def exception_handler(self, ex): # pylint: disable=no-self-use
from azure.cli.core.util import handle_exception
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
'azure-mgmt-servicebus~=0.6.0',
'azure-mgmt-servicefabric~=0.2.0',
'azure-mgmt-signalr~=0.3.0',
'azure-mgmt-sql~=0.15',
'azure-mgmt-sql~=0.15.0',
'azure-mgmt-sqlvirtualmachine~=0.4.0',
'azure-mgmt-storage~=5.0.0',
'azure-mgmt-trafficmanager~=0.51.0',
Expand Down