diff --git a/constants.py b/constants.py index e418209..27236be 100644 --- a/constants.py +++ b/constants.py @@ -155,6 +155,7 @@ WRAPPER_TYPES = [ 'none', 'docker', ] +WRAPPER_ENV_VAR = 'KUPFERBOOTSTRAP_WRAPPED' MAKEPKG_CMD = [ 'makepkg', diff --git a/wrapper/wrapper.py b/wrapper/wrapper.py index 06d0d23..cd1af05 100644 --- a/wrapper/wrapper.py +++ b/wrapper/wrapper.py @@ -7,7 +7,7 @@ from typing import Protocol from config import config from config.state import dump_file as dump_config_file -from constants import CHROOT_PATHS +from constants import CHROOT_PATHS, WRAPPER_ENV_VAR WRAPPER_PATHS = CHROOT_PATHS | { 'ccache': '/ccache', @@ -99,7 +99,7 @@ class BaseWrapper(Wrapper): raise NotImplementedError() def is_wrapped(self): - return os.getenv('KUPFERBOOTSTRAP_WRAPPED') == self.type.upper() + return os.getenv(WRAPPER_ENV_VAR) == self.type.upper() def get_bind_mounts_default(self, wrapped_config_path: str = None, ssh_dir: str = None, target_home: str = '/root'): wrapped_config_path = wrapped_config_path or self.wrapped_config_path