diff --git a/config/utilities/uenv.py b/config/utilities/uenv.py index 130e1666d..1a196f34b 100644 --- a/config/utilities/uenv.py +++ b/config/utilities/uenv.py @@ -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'):