From a4e427f3c7a05e67ace58bdb7621dbdc9a1f59a4 Mon Sep 17 00:00:00 2001 From: Gwendal Laurent <44499033+GwendalLaurent@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:26:07 +0100 Subject: [PATCH] better handling of test profile for hackney insecure option (#17) --- src/rebar3_grisp_io_api.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/rebar3_grisp_io_api.erl b/src/rebar3_grisp_io_api.erl index 6ec7866..581dc94 100644 --- a/src/rebar3_grisp_io_api.erl +++ b/src/rebar3_grisp_io_api.erl @@ -207,8 +207,9 @@ base_url(RState) -> %% @doc adds the insecure options in the current profile is test (only for dev) insecure_option(RState) -> - case rebar_state:current_profiles(RState) of - [default, test | _] -> + Profiles = rebar_state:current_profiles(RState), + case lists:member(test, Profiles) of + true -> [insecure]; _ -> []