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
new EnvLoader().IgnoreParserException().Load();
Console.WriteLine(Environment.GetEnvironmentVariable("CS"));// Output: server=${MYSQL_HOST};user=root${ };
And:
CS=server=${MYSQL_HOST};user=root${};
The parser is including the expression "${MYSQL_HOST}" in the value, this really doesn't make sense because it doesn't contribute anything. If the parser can't expand the interpolated variable, then don't include anything in the value.
I expect such an output:
server=;user=root;
Well, I think this output makes more sense than the previous one because the parser does not have to include the interpolation expression inside the value in case the variable is unset, why would it do so if it did not find it?
This is not a bug, it would just be nice if this parser behavior could be changed.
I will do a PR to change this.
The text was updated successfully, but these errors were encountered:
Given the following code:
And:
The parser is including the expression "${MYSQL_HOST}" in the value, this really doesn't make sense because it doesn't contribute anything. If the parser can't expand the interpolated variable, then don't include anything in the value.
I expect such an output:
Well, I think this output makes more sense than the previous one because the parser does not have to include the interpolation expression inside the value in case the variable is unset, why would it do so if it did not find it?
This is not a bug, it would just be nice if this parser behavior could be changed.
I will do a PR to change this.
The text was updated successfully, but these errors were encountered: