Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin
- require "did_you_mean"
- module Rake::TaskManager
- def [](task_name, scopes=nil)
- task_name = task_name.to_s
- self.lookup(task_name, scopes) or
- enhance_with_matching_rule(task_name) or
- synthesize_file_task(task_name) or
- (STDERR.puts "Don't know how to build task '#{task_name}' (see --tasks)";
- candidates = DidYouMean::SpellChecker.new(dictionary: @tasks.keys).correct(task_name);
- STDERR.puts "Did you mean? " + candidates.join(', ') unless candidates.empty?;
- exit 1)
- end
- end
- rescue LoadError
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement