diff options
author | Mal Graty <mal.graty@googlemail.com> | 2017-04-30 15:59:10 +0100 |
---|---|---|
committer | Mal Graty <mal.graty@googlemail.com> | 2017-05-01 16:24:24 +0100 |
commit | aeb2a5a25ca4373dd5c6e55f985d1436064aa0ac (patch) | |
tree | d01784c74e4623b99a66db1622c61ed2e661b4c6 | |
parent | 15bd319731e77a645a3e5c2a59c2fb274fcb12b7 (diff) | |
download | bundler-aeb2a5a25ca4373dd5c6e55f985d1436064aa0ac.tar.gz |
Permit absolute paths in cache_path setting
-rw-r--r-- | lib/bundler/settings.rb | 6 | ||||
-rw-r--r-- | spec/cache/cache_path_spec.rb | 8 |
2 files changed, 1 insertions, 13 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb index 3612023cb2..d736de18aa 100644 --- a/lib/bundler/settings.rb +++ b/lib/bundler/settings.rb @@ -213,11 +213,7 @@ module Bundler end def app_cache_path - @app_cache_path ||= begin - path = self[:cache_path] || "vendor/cache" - raise InvalidOption, "Cache path must be relative to the bundle path" if path.start_with?("/") - path - end + @app_cache_path ||= self[:cache_path] || "vendor/cache" end private diff --git a/spec/cache/cache_path_spec.rb b/spec/cache/cache_path_spec.rb index ec6d6e312a..df7c0bd031 100644 --- a/spec/cache/cache_path_spec.rb +++ b/spec/cache/cache_path_spec.rb @@ -23,12 +23,4 @@ RSpec.describe "bundle package" do expect(bundled_app("vendor/cache-foo/rack-1.0.0.gem")).to exist end end - - context "when given an absolute path" do - it "exits with non-zero status" do - bundle :package, "cache-path" => "/tmp/cache-foo" - expect(out).to match(/must be relative/) - expect(exitstatus).to eq(15) if exitstatus - end - end end |