Skip to content

Commit

Permalink
fix: relax regex for setting environment variables (#2964)
Browse files Browse the repository at this point in the history
Allows for environment variables to have dashes in them.
  • Loading branch information
benjamintanweihao committed Sep 7, 2022
1 parent db31e42 commit c075e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bentoml/_internal/bento/build_config.py
Expand Up @@ -106,7 +106,7 @@ def _convert_env(
if isinstance(env, list):
env_dict: dict[str, str | None] = {}
for envvar in env:
match = re.match(r"^(\w+)=(\w+)$", envvar)
match = re.match(r"^(\w+)=([\w-]+)$", envvar)
if not match:
raise BentoMLException(
"All value in `env` list must follow format ENV=VALUE"
Expand Down

0 comments on commit c075e12

Please sign in to comment.