diff options
author | Konstantin Haase <konstantin.mailinglists@googlemail.com> | 2012-05-21 16:25:09 +0200 |
---|---|---|
committer | Konstantin Haase <konstantin.mailinglists@googlemail.com> | 2012-05-21 16:25:09 +0200 |
commit | 3366c03ebdb76186d774c7b39c199a8a0ccafede (patch) | |
tree | 2f3196f5acd1164c5bfb1fbfe512b3558c46d9a0 /lib/bundler/source.rb | |
parent | 4ff58389a147d7271d257bef80f7eeb59d8ff61a (diff) | |
download | bundler-3366c03ebdb76186d774c7b39c199a8a0ccafede.tar.gz |
do not explode if branch is not given for local git repos
Diffstat (limited to 'lib/bundler/source.rb')
-rw-r--r-- | lib/bundler/source.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index a1da86a581..1aed90729e 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -717,12 +717,6 @@ module Bundler path = Pathname.new(path) path = path.expand_path(Bundler.root) unless path.relative? - unless options["branch"] - raise GitError, "Cannot use local override for #{name} at #{path} because " \ - ":branch is not specified in Gemfile. Specify a branch or check " \ - "`bundle config --delete` to remove the local override" - end - unless path.exist? raise GitError, "Cannot use local override for #{name} because #{path} " \ "does not exist. Check `bundle config --delete` to remove the local override" @@ -734,7 +728,7 @@ module Bundler # so the Gemfile.lock always picks up the new revision. @git_proxy = GitProxy.new(path, uri, ref) - if git_proxy.branch != options["branch"] + if options["branch"] and git_proxy.branch != options["branch"] raise GitError, "Local override for #{name} at #{path} is using branch " \ "#{git_proxy.branch} but Gemfile specifies #{options["branch"]}" end |