summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-10-29 15:51:07 +0200
committergit <svn-admin@ruby-lang.org>2021-10-30 06:11:39 +0900
commitf634d1ee00e8327f1e91a5af3792c0e30c38c330 (patch)
tree55790f48878239fb9924ba7be51a885ad288c4fa /lib/bundler
parenta954f273a89f517de188bdd77e73a80a9c9dad2c (diff)
[rubygems/rubygems] Better error when installing a git lockfile and git not present
https://github.com/rubygems/rubygems/commit/28f4842196
Diffstat (limited to 'lib/bundler')
-rw-r--r--lib/bundler/source/git/git_proxy.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 7555561edd..e37ff8724a 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -56,7 +56,6 @@ module Bundler
@ref = ref
@revision = revision
@git = git
- raise GitNotInstalledError.new if allow? && !Bundler.git_present?
end
def revision
@@ -208,7 +207,11 @@ module Bundler
end
def allow?
- @git ? @git.allow_git_ops? : true
+ allowed = @git ? @git.allow_git_ops? : true
+
+ raise GitNotInstalledError.new if allowed && !Bundler.git_present?
+
+ allowed
end
def with_path(&blk)