diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 98508a60ac5..dee58665fce 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -230,7 +230,7 @@ def lock(file) end File.open(file, 'wb'){|f| f.puts(contents) } - rescue Errno::EACCES => e + rescue Errno::EACCES raise Bundler::InstallError, "There was an error while trying to write to Gemfile.lock. It is likely that \n" \ "you need to allow write permissions for the file at path: \n" \ diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index 4f2ce4e7b14..11fe0b587b3 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -513,6 +513,7 @@ def initialize(path, uri, ref, revision=nil, &allow) @allow = allow || Proc.new { true } end + remove_method :revision if method_defined? :revision def revision @revision ||= allowed_in_path { git("rev-parse #{ref}").strip } end