Skip to content

Commit

Permalink
Gradle: Ignore failure to fetch script plugins from submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
greysteil committed May 26, 2019
1 parent e67289e commit 380bec6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gradle/lib/dependabot/gradle/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,20 @@ def dependency_script_plugins
dependency_plugin_paths.map do |path|
fetch_file_from_host(path)
rescue Dependabot::DependencyFileNotFound
next nil if file_exists_in_submodule?(path)

# Experimental feature - raise an error for Dependabot team to review
raise "Script plugin not found: #{path}"
end.compact
end

def file_exists_in_submodule?(path)
fetch_file_from_host(path, fetch_submodules: true)
true
rescue Dependabot::DependencyFileNotFound
false
end

def settings_file
@settings_file ||= fetch_file_from_host("settings.gradle")
rescue Dependabot::DependencyFileNotFound
Expand Down

0 comments on commit 380bec6

Please sign in to comment.