Replace subprocess.Popen with os.startfile on Windows.

This commit is contained in:
voussoir 2026-08-29 16:33:49 -07:00
parent f8e8e7ec07
commit e209e3a4b9

View file

@ -123,8 +123,11 @@ class PGUILauncher(tkinter.Frame):
self.launch_program(self.ready_to_launch.shortcut) self.launch_program(self.ready_to_launch.shortcut)
def launch_program(self, shortcut): def launch_program(self, shortcut):
print('opening application', shortcut.basename) print('opening shortcut', shortcut.basename)
os.chdir(shortcut.parent.absolute_path) os.chdir(shortcut.parent.absolute_path)
if os.name == 'nt':
os.startfile(shortcut.absolute_path)
else:
command = f'"{shortcut.absolute_path}"' command = f'"{shortcut.absolute_path}"'
subprocess.Popen(command, shell=True) subprocess.Popen(command, shell=True)
self.quit() self.quit()