mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 14:14:54 +08:00
restart action: support running as Python module (#1578)
This commit is contained in:
parent
d3d613cca9
commit
42b15ad4a5
@ -1578,6 +1578,9 @@ def restart(self):
|
||||
|
||||
if sys.platform.startswith('win32'):
|
||||
cmds = ['"' + sys.executable + '"', '"' + sys_argv[0] + '"'] + sys_argv[1:]
|
||||
elif sys_argv[0].endswith("__main__.py"): # this is a python module
|
||||
module_name = os.path.basename(os.path.dirname(sys_argv[0]))
|
||||
cmds = [sys.executable, '-m', module_name] + sys_argv[1:]
|
||||
else:
|
||||
cmds = [sys.executable] + sys_argv
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user