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

{Resource} Remove Virtual Terminal related code #23531

Merged
merged 2 commits into from
Aug 19, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
'cryptography',
'humanfriendly~=10.0',
'jmespath',
'knack~=0.9.0',
'knack~=0.10.0',
'msal-extensions~=1.0.0',
'msal==1.18.0b1',
'msrestazure~=0.6.4',
Expand Down
68 changes: 0 additions & 68 deletions src/azure-cli/azure/cli/command_modules/resource/_win_vt.py

This file was deleted.

20 changes: 1 addition & 19 deletions src/azure-cli/azure/cli/command_modules/resource/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import codecs
import json
import os
import platform
import re
import ssl
import sys
Expand Down Expand Up @@ -909,24 +908,7 @@ def _what_if_deploy_arm_template_core(cli_ctx, what_if_poller, no_pretty_print,
if no_pretty_print:
return what_if_result

try:
if cli_ctx.enable_color:
# Disabling colorama since it will silently strip out the Xterm 256 color codes the What-If formatter
# is using. Unfortunately, the colors that colorama supports are very limited, which doesn't meet our needs.
from colorama import deinit
deinit()

# Enable virtual terminal mode for Windows console so it processes color codes.
if platform.system() == "Windows":
from ._win_vt import enable_vt_mode
enable_vt_mode()

print(format_what_if_operation_result(what_if_result, cli_ctx.enable_color))
finally:
if cli_ctx.enable_color:
from colorama import init
init()

print(format_what_if_operation_result(what_if_result, cli_ctx.enable_color))
return what_if_result


Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.Darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ javaproperties==0.5.1
Jinja2==3.0.3
jmespath==0.9.5
jsondiff==2.0.0
knack==0.9.0
knack==0.10.0
MarkupSafe==2.0.1
msal-extensions==1.0.0
msal==1.18.0b1
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.Linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ javaproperties==0.5.1
Jinja2==3.0.3
jmespath==0.9.5
jsondiff==2.0.0
knack==0.9.0
knack==0.10.0
MarkupSafe==2.0.1
msal-extensions==1.0.0
msal==1.18.0b1
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli/requirements.py3.windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ javaproperties==0.5.1
Jinja2==3.0.3
jmespath==0.9.5
jsondiff==2.0.0
knack==0.9.0
knack==0.10.0
MarkupSafe==2.0.1
msal-extensions==1.0.0
msal==1.18.0b1
Expand Down