mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #1768 from pypeclub/bugfix/app_executable_environ_fill
Environments in app executable for MacOS
This commit is contained in:
commit
0781667eda
1 changed files with 6 additions and 6 deletions
|
|
@ -449,6 +449,12 @@ class ApplicationExecutable:
|
|||
"""Representation of executable loaded from settings."""
|
||||
|
||||
def __init__(self, executable):
|
||||
# Try to format executable with environments
|
||||
try:
|
||||
executable = executable.format(**os.environ)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# On MacOS check if exists path to executable when ends with `.app`
|
||||
# - it is common that path will lead to "/Applications/Blender" but
|
||||
# real path is "/Applications/Blender.app"
|
||||
|
|
@ -460,12 +466,6 @@ class ApplicationExecutable:
|
|||
if os.path.exists(_executable):
|
||||
executable = _executable
|
||||
|
||||
# Try to format executable with environments
|
||||
try:
|
||||
executable = executable.format(**os.environ)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
self.executable_path = executable
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue