Properly detach process on Windows

This commit is contained in:
Xarvex
2024-04-25 00:07:14 -05:00
parent 8b4b2507fa
commit 956ffd4663

View File

@@ -61,7 +61,7 @@ logging.basicConfig(format="%(message)s", level=logging.INFO)
def open_file(path: str):
try:
if sys.platform == "win32":
subprocess.Popen(["start", path], shell=True, close_fds=True)
subprocess.Popen(["start", path], shell=True, close_fds=True, creationflags=subprocess.DETACHED_PROCESS)
else:
if sys.platform == "darwin":
command_name = "open"