rake should only load stormbreaker if its installed

Change-Id: I8db6e3b6561e0c6cb00c54e4cea274aaea2d95ac
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/267774
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Brian Watson <bwatson@instructure.com>
Reviewed-by: Ryan Norton <rnorton@instructure.com>
QA-Review: Alex Slaughter <aslaughter@instructure.com>
Product-Review: Alex Slaughter <aslaughter@instructure.com>
This commit is contained in:
Alex Slaughter 2021-06-24 10:19:59 -07:00
parent 901313e195
commit 19138ced0a
1 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# frozen_string_literal: true # frozen_string_literal: true
spec = Gem::Specification.find_by_name 'stormbreaker' if Gem.loaded_specs.has_key?('stormbreaker')
Dir.glob(File.join(spec.gem_dir, 'lib', 'stormbreaker', 'tasks', '*')).each { |f| load f } spec = Gem::Specification.find_by_name 'stormbreaker'
Dir.glob(File.join(spec.gem_dir, 'lib', 'stormbreaker', 'tasks', '*')).each { |f| load f }
end