mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
use pathlib instead
This commit is contained in:
parent
f7ea2cc525
commit
041933e96b
1 changed files with 3 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ import os
|
|||
import sys
|
||||
import code
|
||||
import traceback
|
||||
from pathlib import Path
|
||||
|
||||
import click
|
||||
import acre
|
||||
|
|
@ -178,10 +179,8 @@ def run(script):
|
|||
comp_path = os.path.join(os.environ["AYON_ROOT"], "start.py")
|
||||
else:
|
||||
comp_path = os.getenv("AYON_EXECUTABLE")
|
||||
# Normalize paths for comparison
|
||||
first_arg = os.path.normpath(first_arg).lower()
|
||||
comp_path = os.path.normpath(comp_path).lower()
|
||||
if first_arg == comp_path:
|
||||
# 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)
|
||||
|
||||
# Remove 'run' command from sys.argv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue