diff --git a/src/spring/HISTORY.md b/src/spring/HISTORY.md index ed6043880c8..6c1abb1bfa7 100644 --- a/src/spring/HISTORY.md +++ b/src/spring/HISTORY.md @@ -1,6 +1,10 @@ Release History =============== +1.1.9 +--- +* Fix the crash in windows. + 1.1.8 --- * Add command `az spring app connect`. diff --git a/src/spring/azext_spring/custom.py b/src/spring/azext_spring/custom.py index 781b16e59c1..ea5672558e8 100644 --- a/src/spring/azext_spring/custom.py +++ b/src/spring/azext_spring/custom.py @@ -9,7 +9,6 @@ import re import os import time -import tty from azure.cli.core._profile import Profile from ._websocket import WebSocketConnection, recv_remote, send_stdin, EXEC_PROTOCOL_CTRL_C_MSG @@ -1499,7 +1498,13 @@ def app_connect(cmd, client, resource_group, service, name, reader.daemon = True reader.start() - tty.setcbreak(sys.stdin.fileno()) # needed to prevent printing arrow key characters + try: + import tty + tty.setcbreak(sys.stdin.fileno()) # needed to prevent printing arrow key characters + except ModuleNotFoundError: + # tty works only on Unix + pass + writer = Thread(target=send_stdin, args=(conn,)) writer.daemon = True writer.start() diff --git a/src/spring/setup.py b/src/spring/setup.py index 71b8ec7c58b..0d504c5711c 100644 --- a/src/spring/setup.py +++ b/src/spring/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '1.1.8' +VERSION = '1.1.9' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers