fix gem overrides with eval_gemfile

Change-Id: I90a4f358df6a2c116367ab72df2c8357ae2c1773
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/318331
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>
Build-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2023-05-16 16:01:22 -06:00
parent fb3981b9f6
commit 5f632c66a2
1 changed files with 3 additions and 2 deletions

View File

@ -71,8 +71,9 @@ module GemOverride
if version.last.is_a?(Hash) && kwargs.empty?
kwargs = version.pop
end
if File.directory?("vendor/#{name}")
super(name, path: "vendor/#{name}", **kwargs)
vendor_path = File.expand_path("vendor/#{name}", __dir__)
if File.directory?(vendor_path)
super(name, path: vendor_path, **kwargs)
else
super(name, *version, path: path, **kwargs)
end