From cad45cee4c00ea92bfcda92687fda52f4eb1e29b Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Wed, 10 Apr 2024 17:37:52 +0200 Subject: [PATCH] check for correct first argument --- client/ayon_core/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/cli.py b/client/ayon_core/cli.py index 80fbb57340..bd47dc1aac 100644 --- a/client/ayon_core/cli.py +++ b/client/ayon_core/cli.py @@ -176,9 +176,9 @@ def run(script): # future versions might remove it. first_arg = sys.argv[0] if is_running_from_build(): - comp_path = os.path.join(os.environ["AYON_ROOT"], "start.py") - else: comp_path = os.getenv("AYON_EXECUTABLE") + else: + comp_path = os.path.join(os.environ["AYON_ROOT"], "start.py") # Compare paths and remove first argument if it is the same as AYON if Path(first_arg).resolve() == Path(comp_path).resolve(): sys.argv.pop(0)