mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
DEV: Work around a Docker issue (#13368)
Fixes our backend spec suite in GitHub Actions CI. For more information about the Docker issue see: https://github.com/docker/for-linux/issues/1015 (It's possible that error could also happen in dev/production, though thankfully that hasn't happened yet afaik)
This commit is contained in:
parent
9c1ef2a58a
commit
091beaf4a2
1 changed files with 18 additions and 0 deletions
18
lib/freedom_patches/copy_file.rb
Normal file
18
lib/freedom_patches/copy_file.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "fileutils"
|
||||
|
||||
# See: https://github.com/docker/for-linux/issues/1015
|
||||
|
||||
module FileUtils
|
||||
class Entry_
|
||||
def copy_file(dest)
|
||||
File.open(path()) do |s|
|
||||
File.open(dest, "wb", s.stat.mode) do |f|
|
||||
IO.copy_stream(s, f)
|
||||
f.chmod(f.lstat.mode)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue