Skip to content

Commit

Permalink
Restrict the change of cleanup reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Håkan Mattsson committed Dec 7, 2021
1 parent 90db487 commit 55109e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lux_interpret.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,13 @@ prepare_result(#istate{mode = Mode,
#result{outcome = relax} ->
{OrigCleanupReason, Res#result{outcome = shutdown}};
#result{outcome = NewOutcome} ->
{NewOutcome, Res};
NewCleanupReason =
if
OrigCleanupReason =:= fail -> fail;
NewOutcome =:= fail -> fail;
true -> success
end,
{NewCleanupReason, Res};
{'EXIT', {error, FailReason}} ->
fail_result(LatestCmd, PosStack, ActiveName, FailReason);
{fail, FailReason} ->
Expand Down

0 comments on commit 55109e7

Please sign in to comment.