mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
check for correct first argument
This commit is contained in:
parent
1ece2defc9
commit
cad45cee4c
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue