Fix trayicon autostart script duplicated arguments

This commit is contained in:
shortcutme 2020-02-20 17:19:16 +01:00
parent fca1033f83
commit b1819ff71d
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 7 additions and 2 deletions

View File

@ -132,12 +132,17 @@ class ActionsPlugin(object):
else:
cwd = os.path.dirname(sys.executable)
ignored_args = [
"--open_browser", "default_browser",
"--dist_type", "bundle_win64"
]
if sys.platform == 'win32':
args = ['"%s"' % arg for arg in args if arg]
args = ['"%s"' % arg for arg in args if arg and arg not in ignored_args]
cmd = " ".join(args)
# Dont open browser on autorun
cmd = cmd.replace("start.py", "zeronet.py").replace('"--open_browser"', "").replace('"default_browser"', "").strip()
cmd = cmd.replace("start.py", "zeronet.py").strip()
cmd += ' --open_browser ""'
return "\r\n".join([