mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
workaround to get adequate window size on Windows Terminal
This commit is contained in:
parent
117536324c
commit
090b7eeaf3
@ -24,7 +24,16 @@ def set_terminal_size(columns: int, lines: int):
|
||||
|
||||
OS = platform.uname().system
|
||||
if OS == "Windows":
|
||||
_set_terminal_size_powershell(width,height)
|
||||
# The new Windows Terminal doesn't resize, so we relaunch in a CMD window.
|
||||
# Would prefer to use execvpe() here, but somehow it is not working properly
|
||||
# in the Windows 10 environment.
|
||||
if 'WT_SESSION' in os.environ:
|
||||
args=['conhost']
|
||||
args.extend(sys.argv)
|
||||
os.environ.pop('WT_SESSION')
|
||||
os.execvp('conhost',args)
|
||||
else:
|
||||
_set_terminal_size_powershell(width,height)
|
||||
elif OS in ["Darwin", "Linux"]:
|
||||
_set_terminal_size_unix(width,height)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user