diff options
author | The Bundler Bot <bot@bundler.io> | 2018-06-15 04:21:45 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2018-06-15 04:21:45 +0000 |
commit | e87e499f9461ee5e00ef2f3cad600dac82152934 (patch) | |
tree | 430e58a536eee4a216474c9c4eb6a62e1cc92b05 /spec/install | |
parent | f358c36b580723a39c7dd72fafd883e59d9b05df (diff) | |
parent | 5fa3b679f548f17bd9607bb7bc2e0d0e133f5887 (diff) | |
download | bundler-e87e499f9461ee5e00ef2f3cad600dac82152934.tar.gz |
Auto merge of #6573 - bundler:colby/process-lock-enotsup, r=segiddins
handle Errno::ENOTSUP in the Bundler process lock
### What was the end-user problem that led to this PR?
Bundler is trying to perform an operation on an NFS that is raising an exception (Errno::ENOTSUP)
### What was your diagnosis of the problem?
See #6566
### What is your fix for the problem, implemented in this PR?
Catch the exception and allow Bundler to continue
### Why did you choose this fix out of the possible options?
This conforms with the existing pattern in regards to handling these types of errors in the Bundler process lock logic.
Diffstat (limited to 'spec/install')
-rw-r--r-- | spec/install/process_lock_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/install/process_lock_spec.rb b/spec/install/process_lock_spec.rb index 02217f493b..be8fd04fdd 100644 --- a/spec/install/process_lock_spec.rb +++ b/spec/install/process_lock_spec.rb @@ -20,5 +20,16 @@ RSpec.describe "process lock spec" do thread.join expect(the_bundle).to include_gems "rack 1.0" end + + context "when creating a lock raises Errno::ENOTSUP", :ruby => ">= 1.9" do + before { allow(File).to receive(:open).and_raise(Errno::ENOTSUP) } + + it "skips creating the lock file and yields" do + processed = false + Bundler::ProcessLock.lock(default_bundle_path) { processed = true } + + expect(processed).to eq true + end + end end end |