Sha256: 6dfa93f7ce55001426d228ebfb12b0bd0502d897b7e53f87495e3fc256d0227e
Contents?: true
Size: 425 Bytes
Versions: 17
Compression:
Stored size: 425 Bytes
Contents
require 'fileutils' module FileUtils module_function LINKING_SUPPORTED = [true] # Attempt to do a normal file link, but fall back # to a copy if the link fails. # # CREDIT Jim Weirich def safe_ln(*args) unless LINKING_SUPPORTED[0] cp(*args) else begin ln(*args) rescue Errno::EOPNOTSUPP LINKING_SUPPORTED[0] = false cp(*args) end end end end
Version data entries
17 entries across 17 versions & 2 rubygems