Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/utilities/uenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ def _get_uenvs():
f"{inspect_cmd}='{{system}}'", shell=True).stdout.strip()

image_path = pathlib.Path(image_path)
# Check that uenv was pulled
if not image_path.is_file():
raise ConfigError(f"{uenv_name} is missing, "
f"try pulling it with: uenv image pull {uenv_name}")
try:
if image_path.stat().st_size == 0:
raise ConfigError(f"{uenv_name} is empty, "
f"try pulling it with: uenv image pull {uenv_name}")
except FileNotFoundError:
raise ConfigError(f"{uenv_name} was not found")

# FIXME temporary workaround for older uenv versions
if Version(uenv_version) >= Version('5.1.0-dev'):
Expand Down