Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/fix_db_schema_conflicts/tasks/db.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ namespace :db do
"#{Rails.root}/db/schema.rb"
end
autocorrect_config = FixDBSchemaConflicts::AutocorrectConfiguration.load
rubocop_binary = "#{Rails.root}/bin/rubocop"
rubocop_binary = "bundle exec rubocop" unless File.exists?(rubocop_binary)
rubocop_yml = File.expand_path("../../../../#{autocorrect_config}", __FILE__)
`bundle exec rubocop --auto-correct --config #{rubocop_yml} #{filename.shellescape}`
`#{rubocop_binary} --auto-correct --config #{rubocop_yml} #{filename.shellescape}`
end
end
end