platform safe file.link which attempts a copy if hard-linking fails.
platform safe file.link which attempts a copy if hard-linking fails
42 43 44 45 46 47 48
# File 'lib/sup/util.rb', line 42 def self.safe_link src, dest begin File.link src, dest rescue FileUtils.copy src, dest end end