You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I just came across a problem and I'm not even sure if it's a bug or the intended behavior.
In the latest version of smallrye-config, environment variables with dashes in them are not picked up by the library.
Here's a small reproducer:
If I set an environment variable my-message=Hello world (bash won't allow this, but IntelliJ and Docker do) and run the code above using version 3.3.4, it prints Hello world, but if I run it using version 3.4.1 it throws an exception.
I'm not sure if this was ever supposed to work since the documentation explains the proper way of defining config environment variables, but in previous versions of the library this worked, so I thought I should open this issue.
I think this is caused by this bit of the equals method of EnvConfigSource.EnvProperty. I wonder if it should instead be similar to the one right above it, something like:
...
} elseif (o == '-') {
if (n != '.' && n != '-' && n != '_') {
returnfalse
}
} ...
The text was updated successfully, but these errors were encountered:
Sorry, I forgot to respond last week!
Sticking to posix-compliant variables is definitely a good idea and I'll be doing that from now on. But thank you for fixing this! Really appreciate it!
Hello!
I just came across a problem and I'm not even sure if it's a bug or the intended behavior.
In the latest version of smallrye-config, environment variables with dashes in them are not picked up by the library.
Here's a small reproducer:
If I set an environment variable
my-message=Hello world
(bash won't allow this, but IntelliJ and Docker do) and run the code above using version 3.3.4, it printsHello world
, but if I run it using version 3.4.1 it throws an exception.I'm not sure if this was ever supposed to work since the documentation explains the proper way of defining config environment variables, but in previous versions of the library this worked, so I thought I should open this issue.
I think this is caused by this bit of the
equals
method ofEnvConfigSource.EnvProperty
. I wonder if it should instead be similar to the one right above it, something like:The text was updated successfully, but these errors were encountered: