Skip to content

Commit

Permalink
Merge pull request #306 from takahashim/fix-253
Browse files Browse the repository at this point in the history
Fix db:seed in docker
  • Loading branch information
ayuki-joto authored Nov 10, 2021
2 parents 43a71a7 + fb0d438 commit ed9eddb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/initializers/fileutils.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

require_relative "../../lib/monkey_patching_fileutils"
15 changes: 15 additions & 0 deletions lib/monkey_patching_fileutils.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

# ref. https://github.com/docker/for-linux/issues/1015#issuecomment-811453779
module FileUtilsDockerPatch
def copy_file(dest)
FileUtils.touch(path)
super
end
end

module FileUtils
class Entry_ # rubocop:disable Naming/ClassAndModuleCamelCase
prepend FileUtilsDockerPatch
end
end

0 comments on commit ed9eddb

Please sign in to comment.