Fix updater restart to use launcher.ps1 instead of deleted start.bat
This commit is contained in:
1 parent
56361b7a11
commit
79d9abef34
1 file changed
+5
-2
@@ -229,9 +229,12 @@ class UpdateService:
|
|||||||
"""Restart the dashboard via the launcher script to preserve SSH/DB tunnels."""
|
"""Restart the dashboard via the launcher script to preserve SSH/DB tunnels."""
|
||||||
try:
|
try:
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
launcher = os.path.join(self.project_root, 'start.bat')
|
launcher = os.path.join(self.project_root, 'launcher.ps1')
|
||||||
if os.path.exists(launcher):
|
if os.path.exists(launcher):
|
||||||
subprocess.Popen(['cmd', '/c', 'start', '', launcher], shell=True)
|
subprocess.Popen(
|
||||||
|
['powershell', '-NoProfile', '-ExecutionPolicy', 'Bypass', '-File', launcher],
|
||||||
|
creationflags=subprocess.CREATE_NEW_CONSOLE
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
subprocess.Popen([sys.executable, os.path.join(self.project_root, 'run.py')], creationflags=subprocess.CREATE_NEW_CONSOLE)
|
subprocess.Popen([sys.executable, os.path.join(self.project_root, 'run.py')], creationflags=subprocess.CREATE_NEW_CONSOLE)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in new issue
Block a user