From 36e41208a0119dc1e851b5d682426cffc41782d7 Mon Sep 17 00:00:00 2001 From: GwendalLaurent Date: Wed, 6 Nov 2024 09:20:38 +0100 Subject: [PATCH] better handling of test profile for hackney insecure option --- 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]; _ -> []