From b476e5a351b69e4c3acfeacdcddd6fc02de5358e Mon Sep 17 00:00:00 2001 From: Mike Dalessio & Rick Reilly Date: Mon, 6 Oct 2014 12:26:59 -0400 Subject: [PATCH] Avoiding unnecessary warning message during cache copy `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. --- lib/language_pack/cache.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/language_pack/cache.rb b/lib/language_pack/cache.rb index 478134a4c..88100c679 100644 --- a/lib/language_pack/cache.rb +++ b/lib/language_pack/cache.rb @@ -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