Commit 45cba2e2 authored by Carson McDonald's avatar Carson McDonald

Fail if dependency isn't found

parent bc843ed9
...@@ -275,13 +275,20 @@ module MRuby ...@@ -275,13 +275,20 @@ module MRuby
req_versions = dep[:requirements] req_versions = dep[:requirements]
# check each GEM dependency against all available GEMs # check each GEM dependency against all available GEMs
found_dep_gem = false
each do |dep_g| each do |dep_g|
if name == dep_g.name if name == dep_g.name
unless dep_g.version_ok?(req_versions) unless dep_g.version_ok?(req_versions)
fail "#{name} version should be #{req_versions.join(' and ')} but was '#{dep_g.version}'" fail "#{name} version should be #{req_versions.join(' and ')} but was '#{dep_g.version}'"
end end
found_dep_gem = true
break
end end
end end
fail "The GEM '#{g.name}' depends on the GEM '#{name}' but it could not be found" unless found_dep_gem
end end
end end
end end
......
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