-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Elixir and Erlang/OTP versions
Erlang/OTP 27 [erts-15.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
Elixir 1.18.2 (compiled with Erlang/OTP 25)
Operating system
MacOS 15.3.1
Current behavior
I have some local environment variables that are loaded using direnv. This had previously been working for years but I ran into this issue this morning and I am completely baffled.
If I have an environment variable defined below it will not load in elixir. (Ends with = due to it being a Base64 encoded variable)
export TEST="foo="If I remove the "=" from the end of the variable everything works as expected.
export TEST="foo"If I run echo $TEST in my shell it will return
=> echo $TEST
foo=If I run this code: TEST="asdf=" elixir --eval 'System.get_env("TEST") |> IO.inspect()', it returns nil.
If I run this code: TEST="asdf=" erl -noshell -eval 'io:format(os:getenv("TEST")).' -s init stop it works
If I run this code inside iex :os.getenv(~c"TEST") it returns false.
Expected behavior
I expect variables that include an equals sign at the end to work.