Better error message when a sub command is missing.
This commit is contained in:
parent
ab25ba0b40
commit
2be7567bb2
@ -16,8 +16,10 @@ module Compass::Commands
|
|||||||
matching.first
|
matching.first
|
||||||
elsif name =~ /^-/
|
elsif name =~ /^-/
|
||||||
nil
|
nil
|
||||||
else
|
elsif matching.size > 1
|
||||||
raise Compass::Error, "Ambiguous abbreviation '#{name}'. Did you mean one of: #{matching.join(", ")}"
|
raise Compass::Error, "Ambiguous abbreviation '#{name}'. Did you mean one of: #{matching.join(", ")}"
|
||||||
|
else
|
||||||
|
raise Compass::Error, "Command not found: #{name}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def abbreviation?(name)
|
def abbreviation?(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user