From a8066b35a9d0bdbc360e57db829d8fab65a70d15 Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Tue, 25 Jan 2011 21:29:08 -0700 Subject: [PATCH] Use an order independent method for exact matches when looking for command candidates --- src/rebar.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rebar.erl b/src/rebar.erl index 69725b3..5121f59 100644 --- a/src/rebar.erl +++ b/src/rebar.erl @@ -258,9 +258,9 @@ get_command_name_candidates(Command) -> is_command_name_candidate(Command, Candidate)], %% Is there a complete match? If so return only that, return a %% list of candidates otherwise - case Candidates of - [Command] = Match -> Match; - _ -> Candidates + case lists:member(Command, Candidates) of + true -> [Command]; + false -> Candidates end. is_command_name_candidate(Command, Candidate) ->