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 noticed a minor issue during development, but it could cause confusion when using an env var as a feature flag, etc.
Steps to reproduce:
Create an new variable in EnvKey under the dev environment, e.g. ENVKEY_WORKING=yes
Stop Spring if running (spring stop)
Start the Rails console
Check the var: puts ENV['ENVKEY_WORKING'] # => yes
Rename the variable in Envkey to ENVKEY_RUNNING
Restart the Rails console (with Spring)
Check the new var: puts ENV['ENVKEY_RUNNING'] # => yes
Check the old var: puts ENV['ENVKEY_WORKING'] # => yes
I would expect that the old ENVKEY_WORKING var would be removed. I can see how that would be tricky with the Spring preloader, but maybe you could store a list of variables that were set, and then compare that against the new list when the Rails process restarts, and remove any deleted ones from ENV.
Just a small issue but thought I should mention it! Cheers!
The text was updated successfully, but these errors were encountered:
Hello, I just noticed a minor issue during development, but it could cause confusion when using an env var as a feature flag, etc.
Steps to reproduce:
ENVKEY_WORKING=yes
spring stop
)puts ENV['ENVKEY_WORKING'] # => yes
ENVKEY_RUNNING
puts ENV['ENVKEY_RUNNING'] # => yes
puts ENV['ENVKEY_WORKING'] # => yes
I would expect that the old
ENVKEY_WORKING
var would be removed. I can see how that would be tricky with the Spring preloader, but maybe you could store a list of variables that were set, and then compare that against the new list when the Rails process restarts, and remove any deleted ones fromENV
.Just a small issue but thought I should mention it! Cheers!
The text was updated successfully, but these errors were encountered: