mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix launcher display on Tools>Upgrade/Downgrade on Windows 10
Thanks to abdo: https://forums.ankiweb.net/t/anki-25-08-beta-3/64738/6
This commit is contained in:
parent
baeccfa3e4
commit
69d54864a8
2 changed files with 12 additions and 6 deletions
|
@ -156,12 +156,15 @@ def update_and_restart() -> None:
|
||||||
creationflags = (
|
creationflags = (
|
||||||
subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.DETACHED_PROCESS
|
subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.DETACHED_PROCESS
|
||||||
)
|
)
|
||||||
|
# On Windows 10, changing the handles breaks ANSI display
|
||||||
|
io = None if sys.platform == "win32" else subprocess.DEVNULL
|
||||||
|
|
||||||
subprocess.Popen(
|
subprocess.Popen(
|
||||||
[launcher],
|
[launcher],
|
||||||
start_new_session=True,
|
start_new_session=True,
|
||||||
stdin=subprocess.DEVNULL,
|
stdin=io,
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=io,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=io,
|
||||||
env=env,
|
env=env,
|
||||||
creationflags=creationflags,
|
creationflags=creationflags,
|
||||||
)
|
)
|
||||||
|
|
|
@ -95,12 +95,15 @@ def update_and_restart() -> None:
|
||||||
creationflags = (
|
creationflags = (
|
||||||
subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.DETACHED_PROCESS
|
subprocess.CREATE_NEW_PROCESS_GROUP | subprocess.DETACHED_PROCESS
|
||||||
)
|
)
|
||||||
|
# On Windows, changing the handles breaks ANSI display
|
||||||
|
io = None if sys.platform == "win32" else subprocess.DEVNULL
|
||||||
|
|
||||||
subprocess.Popen(
|
subprocess.Popen(
|
||||||
[launcher],
|
[launcher],
|
||||||
start_new_session=True,
|
start_new_session=True,
|
||||||
stdin=subprocess.DEVNULL,
|
stdin=io,
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=io,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=io,
|
||||||
env=env,
|
env=env,
|
||||||
creationflags=creationflags,
|
creationflags=creationflags,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue