From bef4abe9856020bdef54e0656d6548ec5d2157df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Sat, 13 Apr 2024 22:01:59 +0200 Subject: [PATCH] Added warning about using old Windows terminal --- CurseBreaker.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CurseBreaker.py b/CurseBreaker.py index b3bb259..f2fc541 100644 --- a/CurseBreaker.py +++ b/CurseBreaker.py @@ -277,11 +277,16 @@ def auto_update(self): sys.exit(1) def motd_parser(self): - payload = self.core.http.get('https://cursebreaker.acidweb.dev/motd') - if payload.status_code == 200: - self.console.print(Panel(payload.content.decode('UTF-8'), title=':warning: MOTD :warning:', - border_style='red')) + if detect_legacy_windows(): + self.console.print(Panel('The old Windows terminal was detected. Use of the new Windows Terminal is highly ' + 'recommended. https://aka.ms/terminal', title='WARNING', border_style='red')) self.console.print('') + else: + payload = self.core.http.get('https://cursebreaker.acidweb.dev/motd') + if payload.status_code == 200: + self.console.print(Panel(payload.content.decode('UTF-8'), title=':warning: MOTD :warning:', + border_style='red')) + self.console.print('') def handle_exception(self, e, table=True): if self.table.row_count > 1 and table: