diff options
Diffstat (limited to 'lib/bundler/fetcher/dependency.rb')
-rw-r--r-- | lib/bundler/fetcher/dependency.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/fetcher/dependency.rb b/lib/bundler/fetcher/dependency.rb index 445b0f2332..1430d1ebeb 100644 --- a/lib/bundler/fetcher/dependency.rb +++ b/lib/bundler/fetcher/dependency.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + require "bundler/fetcher/base" require "cgi" @@ -6,7 +7,7 @@ module Bundler class Fetcher class Dependency < Base def available? - fetch_uri.scheme != "file" && downloader.fetch(dependency_api_uri) + @available ||= fetch_uri.scheme != "file" && downloader.fetch(dependency_api_uri) rescue NetworkDownError => e raise HTTPError, e.message rescue AuthenticationRequiredError |