From 57af2f5f53747cf60d6d366fd82dd6fbd0749df0 Mon Sep 17 00:00:00 2001 From: Terry McGuinness Date: Tue, 25 Jun 2024 19:44:45 -0400 Subject: [PATCH] updated regex in config --- src/wxflow/configuration.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wxflow/configuration.py b/src/wxflow/configuration.py index d2b6c81..2d01c4f 100644 --- a/src/wxflow/configuration.py +++ b/src/wxflow/configuration.py @@ -99,7 +99,8 @@ def _get_script_env(cls, scripts: List) -> Dict[str, Any]: default_env = cls._get_shell_env([]) and_script_env = cls._get_shell_env(scripts) keys_in_scripts = set() - regex_pattern = 'export\\s+\\b(' + '|'.join(map(re.escape, default_env.keys())) + ')(?==)' + #regex_pattern = 'export\\s+\\b(' + '|'.join(map(re.escape, default_env.keys())) + ')(?==)' + regex_pattern = '\\b(' + '|'.join(map(re.escape, default_env.keys())) + ')(?==)' for script in scripts: result = subprocess.run(['grep', '-o', '-P', regex_pattern, script], stdout=subprocess.PIPE) keys_in_scripts.update(result.stdout.decode().split())