diff options
author | Andre Arko <andre@arko.net> | 2013-12-18 16:18:41 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-12-18 22:28:36 -0800 |
commit | 51374c98da6d7137fec13dd4bc85fc9f443cd83a (patch) | |
tree | ce92ad46fe2e33d980f098323d86f40899841c28 | |
parent | f05bd1c798268639ee55c85c3858304a8ee3fd50 (diff) | |
download | bundler-51374c98da6d7137fec13dd4bc85fc9f443cd83a.tar.gz |
friendlier error message
-rw-r--r-- | lib/bundler/source/path.rb | 3 | ||||
-rw-r--r-- | spec/install/gemfile/path_spec.rb | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/source/path.rb b/lib/bundler/source/path.rb index dd229db783..ae65b37b3f 100644 --- a/lib/bundler/source/path.rb +++ b/lib/bundler/source/path.rb @@ -103,7 +103,8 @@ module Bundler somepath.expand_path(Bundler.root) rescue ArgumentError => e Bundler.ui.debug(e) - raise PathError, "The path `#{somepath}` could not be used due to an error: #{e.message}." + raise PathError, "There was an error while trying to use the path " \ + "`#{somepath}`.\nThe error message was: #{e.message}." end def app_cache_path diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index bab6fed200..f36f383877 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -54,7 +54,7 @@ describe "bundle install with explicit source paths" do install_gemfile <<-G gem 'foo', :path => "~#{username}/#{relative_path}" G - expect(out).to match("The path `~#{username}/#{relative_path}` could not be used due to an error") + expect(out).to match("There was an error while trying to use the path `~#{username}/#{relative_path}`.") expect(out).to match("user #{username} doesn't exist") end |