Loading src/engines/engine.py +13 −0 Changes for src/engines/engine.py: 13 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,11 +2,14 @@ # Standard libraries from enum import Enum from os import environ from sys import exit as sys_exit from typing import Dict, List # Components from ..models.images import Entrypoint from ..package.bundle import Bundle from ..prints.colors import Colors from ..system.platform import Platform from ..types.volumes import Volumes from .base import _ExecResult, _LogsResult, BaseEngine, Commands, ContainerName Loading Loading @@ -112,6 +115,16 @@ class Engine: except (KeyboardInterrupt, ModuleNotFoundError, PermissionError): engine = None # Ignore pre-commit hook without engine if not engine and 'PRE_COMMIT' in environ: print(f' {Colors.GREEN}{Bundle.NAME}: {Colors.RED}ERROR:' f' {Colors.BOLD}Unknown or unsupported container engine...' f' {Colors.CYAN}README: {Bundle.REPOSITORY}#supported-container-engines' f' {Colors.YELLOW_LIGHT}(Ignored in \'pre-commit\' context)' f'{Colors.RESET}') print(' ') sys_exit(0) # Unknown engine fallback if not engine: raise NotImplementedError( Loading Loading
src/engines/engine.py +13 −0 Changes for src/engines/engine.py: 13 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,11 +2,14 @@ # Standard libraries from enum import Enum from os import environ from sys import exit as sys_exit from typing import Dict, List # Components from ..models.images import Entrypoint from ..package.bundle import Bundle from ..prints.colors import Colors from ..system.platform import Platform from ..types.volumes import Volumes from .base import _ExecResult, _LogsResult, BaseEngine, Commands, ContainerName Loading Loading @@ -112,6 +115,16 @@ class Engine: except (KeyboardInterrupt, ModuleNotFoundError, PermissionError): engine = None # Ignore pre-commit hook without engine if not engine and 'PRE_COMMIT' in environ: print(f' {Colors.GREEN}{Bundle.NAME}: {Colors.RED}ERROR:' f' {Colors.BOLD}Unknown or unsupported container engine...' f' {Colors.CYAN}README: {Bundle.REPOSITORY}#supported-container-engines' f' {Colors.YELLOW_LIGHT}(Ignored in \'pre-commit\' context)' f'{Colors.RESET}') print(' ') sys_exit(0) # Unknown engine fallback if not engine: raise NotImplementedError( Loading