diff --git a/config/initializers/fileutils.rb b/config/initializers/fileutils.rb new file mode 100644 index 0000000000..1077050d4e --- /dev/null +++ b/config/initializers/fileutils.rb @@ -0,0 +1,3 @@ +# frozen_string_literal: true + +require_relative "../../lib/monkey_patching_fileutils" diff --git a/lib/monkey_patching_fileutils.rb b/lib/monkey_patching_fileutils.rb new file mode 100644 index 0000000000..ef562433ea --- /dev/null +++ b/lib/monkey_patching_fileutils.rb @@ -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