From af3a1326d13c972da79c7a1f67e2cac832599b41 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Mon, 20 Dec 2021 13:07:28 -0300 Subject: [PATCH] chore(update_appup): bugfix: variable not pinned in lambda --- scripts/update_appup.escript | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/update_appup.escript b/scripts/update_appup.escript index efd98b046..050a180bb 100755 --- a/scripts/update_appup.escript +++ b/scripts/update_appup.escript @@ -316,7 +316,7 @@ contains_restart_application(Application, Actions) -> find_application_stop_instruction(Application, Actions) -> {Before, After0} = lists:splitwith( - fun({apply, {application, stop, [Application]}}) -> + fun({apply, {application, stop, [App]}}) when App =:= Application -> false; (_) -> true @@ -345,7 +345,7 @@ ensure_version(Version, OldInstructions) -> case contains_version(Version, OldVersions) of false -> [{Version, []} | OldInstructions]; - _ -> + true -> OldInstructions end. @@ -358,10 +358,8 @@ contains_version(Needle, Haystack) when is_list(Needle) -> nomatch -> false end; - (Needle) -> - true; - (_) -> - false + (Vsn) -> + Vsn =:= Needle end, Haystack).