wrapper: move env var name to constants.WRAPPER_ENV_VAR
This commit is contained in:
parent
c726541967
commit
96ead1ec21
2 changed files with 3 additions and 2 deletions
|
@ -155,6 +155,7 @@ WRAPPER_TYPES = [
|
||||||
'none',
|
'none',
|
||||||
'docker',
|
'docker',
|
||||||
]
|
]
|
||||||
|
WRAPPER_ENV_VAR = 'KUPFERBOOTSTRAP_WRAPPED'
|
||||||
|
|
||||||
MAKEPKG_CMD = [
|
MAKEPKG_CMD = [
|
||||||
'makepkg',
|
'makepkg',
|
||||||
|
|
|
@ -7,7 +7,7 @@ from typing import Protocol
|
||||||
|
|
||||||
from config import config
|
from config import config
|
||||||
from config.state import dump_file as dump_config_file
|
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 | {
|
WRAPPER_PATHS = CHROOT_PATHS | {
|
||||||
'ccache': '/ccache',
|
'ccache': '/ccache',
|
||||||
|
@ -99,7 +99,7 @@ class BaseWrapper(Wrapper):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def is_wrapped(self):
|
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'):
|
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
|
wrapped_config_path = wrapped_config_path or self.wrapped_config_path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue