Sha256: 71b2f914a164e9ff36f9bb6a65e3b6bd389e87ac92f147e4c79aa0867b86ef05

Contents?: true

Size: 392 Bytes

Versions: 87

Compression:

Stored size: 392 Bytes

Contents

require 'fileutils'

module FileUtils
  class << self
    # Override mv to avoid several bugs (Errno::EACCES in Windows, Errno::ENOENT
    #   with relative softlinks on Linux), by forcing to copy and delete instead
    #
    # @see {FileUtils::mv}
    # @see {safe_mv}
    def mv(src, dest, options = {})
      FileUtils.cp_r(src, dest, options)
      FileUtils.rm_rf(src)
    end
  end
end

Version data entries

87 entries across 87 versions & 2 rubygems

Version Path
berkshelf-1.1.2 lib/berkshelf/core_ext/file_utils.rb
berkshelf-1.1.1 lib/berkshelf/core_ext/file_utils.rb
berkshelf-1.1.0 lib/berkshelf/core_ext/file_utils.rb
berkshelf-1.1.0.rc1 lib/berkshelf/core_ext/file_utils.rb
berkshelf-1.0.4 lib/berkshelf/core_ext/file_utils.rb
berkshelf-1.0.3 lib/berkshelf/core_ext/file_utils.rb
berkshelf-1.0.2 lib/berkshelf/core_ext/file_utils.rb