Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency with ruby dotenv: handling of alphabetical $ variables #155

Open
hpello opened this issue Sep 13, 2021 · 0 comments
Open

Inconsistency with ruby dotenv: handling of alphabetical $ variables #155

hpello opened this issue Sep 13, 2021 · 0 comments

Comments

@hpello
Copy link

hpello commented Sep 13, 2021

What do you want to report?

Inconsistency with ruby dotenv

What version?

  • godotenv v1.3.0
  • dotenv-2.7.6

What do you observe?

When the x variable is not defined,
Numeric $x fields disappear, but alphabetical $x fields remain.
In the case of $_x, only the _ is swallowed.
=> It is not the same result with godotenv than with ruby's dotenv

What env file do you use?

  • .env:
VARIABLE_0=$a$0$12$_x
VARIABLE_1="$a$0$12$_x"
VARIABLE_2='$a$0$12$_x'
VARIABLE_3=       $a$0$12$_x

What do you observe?

# result of: godotenv env | grep VARIABLE
VARIABLE_0=$ax
VARIABLE_1=$ax
VARIABLE_2=$a$0$12$_x
VARIABLE_3=$ax

What is the expected result?

With ruby's dotenv:

# result of: dotenv env | grep VARIABLE
VARIABLE_0=
VARIABLE_1=
VARIABLE_2=$a$0$12$_x
VARIABLE_3=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant