From 324a3b9178790f4b3e66cd09f734d03abd923acd Mon Sep 17 00:00:00 2001 From: = <=> Date: Mon, 19 Feb 2024 11:37:54 +0700 Subject: [PATCH] Add sen2cor bashrc path cfg environment variable option --- sen2chain/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sen2chain/config.py b/sen2chain/config.py index f35eafe..4d3471d 100644 --- a/sen2chain/config.py +++ b/sen2chain/config.py @@ -87,6 +87,11 @@ class Config: else: self._create_config() + # Override the Sen2cor Bashrc path with an environment variable if it exists + env_sen2cor_bashrc_paths = os.environ.get("SEN2CHAIN_SEN2COR_BASHRC_PATHS","") + if env_sen2cor_bashrc_paths: + self._config_params["SEN2COR PATH"]["sen2cor_bashrc_paths"] = env_sen2cor_bashrc_paths + self.config_dict = dict() for section in self._config_params.sections(): -- GitLab