Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore Read-Only Filesystems #358

Merged
merged 2 commits into from Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/bootsnap/load_path_cache/store.rb
Expand Up @@ -91,6 +91,7 @@ def dump_data
FileUtils.mv(tmp, @store_path)
rescue Errno::EEXIST
retry
rescue SystemCallError
end
end
end
Expand Down
6 changes: 6 additions & 0 deletions test/load_path_cache/store_test.rb
Expand Up @@ -74,6 +74,12 @@ def test_retry_on_collision

store.transaction { store.set('a', 1) }
end

def test_ignore_read_only_filesystem
MessagePack.expects(:dump).raises(Errno::EROFS.new("Read-only file system @ rb_sysopen"))
store.transaction { store.set('a', 1) }
refute(File.exist?(@path))
end
end
end
end