Skip to content
Browse files

Use an order independent method for exact matches when looking for co…

…mmand candidates
  • Loading branch information...
1 parent 6978504 commit a8066b35a9d0bdbc360e57db829d8fab65a70d15 @dizzyd dizzyd committed Jan 25, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/rebar.erl
View
6 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) ->

0 comments on commit a8066b3

Please sign in to comment.
Something went wrong with that request. Please try again.