fix bin/rubocop to work when pwd != rails root
Change-Id: Ib8aabe6948800e0ab143b448e4814c916029668b Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/276296 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Jacob Burroughs <jburroughs@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
dcd871fbce
commit
759268f7dd
|
@ -10,13 +10,15 @@
|
|||
|
||||
require "bundler/inline"
|
||||
|
||||
# be tricksy and use a tiny subset of the gemfile so that
|
||||
# it will be very quick
|
||||
gemfile do
|
||||
Dir.chdir(File.expand_path("..", __dir__)) do
|
||||
# be tricksy and use a tiny subset of the gemfile so that
|
||||
# it will be very quick
|
||||
gemfile do
|
||||
source 'https://rubygems.org/'
|
||||
|
||||
gemfile = File.expand_path("../Gemfile.d/rubocop.rb", __dir__)
|
||||
eval(File.read(gemfile))
|
||||
end
|
||||
end
|
||||
|
||||
load Gem.bin_path("rubocop", "rubocop")
|
||||
|
|
Loading…
Reference in New Issue