Commit d54e772a by cuong.tran

Display an error message if not run from the root of the project, #186

parent d84a9736
#!/usr/bin/env ruby
unless File.exists?('./Rakefile') || File.exists?('./Gemfile')
abort "Please run annotate from the root of the project."
end
require 'rubygems'
begin
require 'bundler'
......@@ -146,7 +151,6 @@ OptionParser.new do |opts|
end.parse!
options=Annotate.setup_options({ :is_rake => !ENV['is_rake'].blank? })
options = Annotate.setup_options({ :is_rake => ENV['is_rake'] && !ENV['is_rake'].empty? })
Annotate.eager_load(options)
target[:klass].send(target[:task], options)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment