Skip to content

Commit

Permalink
Avoiding unnecessary warning message during cache copy
Browse files Browse the repository at this point in the history
`cp` emitted "are the same file" messages due to our hardcoding
of the STACK env var to "". this is a band-aid, which should be
completely addressed when we establish our own STACK convention
in cf.
  • Loading branch information
Mike Dalessio & Rick Reilly committed Oct 6, 2014
1 parent 77d72d8 commit b476e5a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/language_pack/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def load(path, dest = nil)
# @param [String] destination directory
def copy(from, to)
return false unless File.exist?(from)
return true if File.expand_path(from) == File.expand_path(to) # see story 80029582
FileUtils.mkdir_p File.dirname(to)
system("cp -a #{from}/. #{to}")
end
Expand Down

0 comments on commit b476e5a

Please sign in to comment.