summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2011-01-25 21:29:08 -0700
committerDave Smith <dizzyd@dizzyd.com>2011-01-25 21:29:08 -0700
commita8066b35a9d0bdbc360e57db829d8fab65a70d15 (patch)
tree8eb479b8c6f69602abf47a78d976c427ad314ad3 /src
parent6978504d43de4d12d791db974e4748e2cb4c2092 (diff)
downloadrebar-a8066b35a9d0bdbc360e57db829d8fab65a70d15.tar.gz
Use an order independent method for exact matches when looking for command candidates
Diffstat (limited to 'src')
-rw-r--r--src/rebar.erl6
1 files 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) ->