mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added option to pass "latest" to use version argument
This commit is contained in:
parent
767ef9d715
commit
ce20415727
1 changed files with 11 additions and 7 deletions
18
start.py
18
start.py
|
|
@ -667,13 +667,17 @@ def _find_frozen_openpype(use_version: str = None,
|
|||
# Find OpenPype version that should be used
|
||||
openpype_version = None
|
||||
if use_version is not None:
|
||||
# Version was specified with arguments or env OPENPYPE_VERSION
|
||||
# - should crash if version is not available
|
||||
_print("Finding specified version \"{}\"".format(use_version))
|
||||
for version in openpype_versions:
|
||||
if version == use_version:
|
||||
openpype_version = version
|
||||
break
|
||||
if use_version.lower() == "latest":
|
||||
openpype_version = openpype_versions[-1]
|
||||
else:
|
||||
use_version_obj = OpenPypeVersion(use_version)
|
||||
# Version was specified with arguments or env OPENPYPE_VERSION
|
||||
# - should crash if version is not available
|
||||
_print("Finding specified version \"{}\"".format(use_version))
|
||||
for version in openpype_versions:
|
||||
if version == use_version_obj:
|
||||
openpype_version = version
|
||||
break
|
||||
|
||||
if openpype_version is None:
|
||||
raise OpenPypeVersionNotFound(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue