diff --git a/common/lib/dependabot/file_fetchers/base.rb b/common/lib/dependabot/file_fetchers/base.rb index dce0ca5dd55..f8b90a93cf3 100644 --- a/common/lib/dependabot/file_fetchers/base.rb +++ b/common/lib/dependabot/file_fetchers/base.rb @@ -611,7 +611,7 @@ def _clone_repo_contents(target_directory:) CMD ) rescue SharedHelpers::HelperSubprocessFailed => e - raise unless GIT_SUBMODULE_ERROR_REGEX && e.message.downcase.include?("submodule") + raise unless e.message.match(GIT_SUBMODULE_ERROR_REGEX) && e.message.downcase.include?("submodule") submodule_cloning_failed = true match = e.message.match(GIT_SUBMODULE_ERROR_REGEX) diff --git a/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb b/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb index 611161d7bea..6ffabe89186 100644 --- a/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb +++ b/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb @@ -25,7 +25,9 @@ class GoModUpdater /malformed module path/, /used for two different module paths/, # https://github.com/golang/go/issues/56494 - /can't find reason for requirement on/ + /can't find reason for requirement on/, + # import path doesn't exist + /package \S+ is not in GOROOT/ ].freeze REPO_RESOLVABILITY_ERROR_REGEXES = [