Skip to content

Commit

Permalink
Fix compilation on Elixir 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardd committed Sep 10, 2024
1 parent fe1700e commit 6d03db0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/ex_aws/credentials_ini/file.ex
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,16 @@ if Code.ensure_loaded?(ConfigParser) do
end

def parse_ini_file({:ok, contents}, profile_name) do
composite_key = "profile " <> profile_name

contents
|> ConfigParser.parse_string()
|> case do
{:ok, %{^profile_name => config} = full} ->
merge_special_keys(full, config)
|> strip_key_prefix()

{:ok, %{("profile " <> ^profile_name) => config} = full} ->
{:ok, %{^composite_key => config} = full} ->
merge_special_keys(full, config)
|> strip_key_prefix()

Expand Down

0 comments on commit 6d03db0

Please sign in to comment.