Skip to content

Commit

Permalink
Allow environment variables to contain numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
pizaCat committed Apr 30, 2024
1 parent 7a2b4e4 commit 20c73df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changes/1481.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"description": "allow pass-through environment variables to contain numbers",
"type": "fixed"
}
2 changes: 1 addition & 1 deletion src/docker/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ fn validate_env_var<'a>(
&& !*warned
&& !var
.chars()
.all(|c| matches!(c, 'a'..='z' | 'A'..='Z' | '_' ))
.all(|c| matches!(c, 'a'..='z' | 'A'..='Z' | '_' | '0'..='9'))
{
msg_info.warn(format_args!(
"got {var_type} of \"{var}\" which is not a valid environment variable name. the proper syntax is {var_syntax}"
Expand Down

0 comments on commit 20c73df

Please sign in to comment.