bottle: use File.lutime instead of system call

This commit is contained in:
Dustin Rodrigues 2020-09-06 19:43:30 -04:00
parent b2d9594ca7
commit 8ab5ea5249

View File

@ -278,10 +278,7 @@ module Homebrew
keg.find do |file|
if file.symlink?
# Ruby does not support `File.lutime` yet.
# Shellout using `touch` to change modified time of symlink itself.
system "/usr/bin/touch", "-h",
"-t", tab.source_modified_time.strftime("%Y%m%d%H%M.%S"), file
File.lutime(tab.source_modified_time, tab.source_modified_time, file)
else
file.utime(tab.source_modified_time, tab.source_modified_time)
end