Skip to content

Commit

Permalink
updated regex in config
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryMcGuinness-NOAA committed Jun 25, 2024
1 parent 86e31db commit 57af2f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wxflow/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 57af2f5

Please sign in to comment.