Skip to content

Commit

Permalink
fix: env var name extraction with brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Nov 1, 2023
1 parent b03f416 commit bb2c491
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seqerakit/seqeraplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def _check_env_vars(self, command):
for arg in command:
if "$" in arg:
for env_var in re.findall(r"\$\{?[\w]+\}?", arg):
if env_var.replace("$", "") not in os.environ:
if re.sub(r"[${}]", "", env_var) not in os.environ:
raise EnvironmentError(
f" Environment variable '{env_var}' not found!"
f" Environment variable {env_var} not found!"
)
full_cmd_parts.append(arg)
else:
Expand Down

0 comments on commit bb2c491

Please sign in to comment.