View Source Confex.Adapters.FileFromSystemEnvironment (confex v3.5.1)
Adapter to fetch values from a file with path specified in a system environment variables.
Summary
Functions
Fetch value from file which path is specified in an environment variable.
Functions
Fetch value from file which path is specified in an environment variable.
Newline in the end of file is ignored.
Example
iex> :ok = System.delete_env("SOME_TEST_FILE")
...> :error = Elixir.Confex.Adapters.FileFromSystemEnvironment.fetch_value("SOME_TEST_FILE")
...> :ok = System.put_env("SOME_TEST_FILE", "test/fixtures/file_secret.txt")
...> {:ok, "foo_bar"} = Elixir.Confex.Adapters.FileFromSystemEnvironment.fetch_value("SOME_TEST_FILE")
{:ok, "foo_bar"}