mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added cleanup of additional arguments
This commit is contained in:
parent
ebbcbdde12
commit
0b68cbae5c
1 changed files with 11 additions and 0 deletions
|
|
@ -571,7 +571,9 @@ class TrayManager:
|
|||
if args[-1] == additional_args[0]:
|
||||
additional_args.pop(0)
|
||||
|
||||
cleanup_additional_args = False
|
||||
if use_expected_version:
|
||||
cleanup_additional_args = True
|
||||
expected_version = get_expected_version()
|
||||
if expected_version is not None:
|
||||
reset_version = False
|
||||
|
|
@ -585,8 +587,17 @@ class TrayManager:
|
|||
# Add staging flag if was running from staging
|
||||
if is_running_staging():
|
||||
args.append("--use-staging")
|
||||
cleanup_additional_args = True
|
||||
envs.pop("OPENPYPE_VERSION", None)
|
||||
|
||||
if cleanup_additional_args:
|
||||
_additional_args = []
|
||||
for arg in additional_args:
|
||||
if arg == "--use-staging" or arg.startswith("--use-version"):
|
||||
continue
|
||||
_additional_args.append(arg)
|
||||
additional_args = _additional_args
|
||||
|
||||
args.extend(additional_args)
|
||||
|
||||
run_detached_process(args, env=envs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue