From 435518252910b9839033cab4da1c4138d1a8bd99 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 10 Aug 2009 16:34:04 +0100 Subject: [PATCH] Return the installed path(s) from install --- Library/Homebrew/pathname+yeast.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/pathname+yeast.rb b/Library/Homebrew/pathname+yeast.rb index a60ce4bd32..67a21cfc28 100644 --- a/Library/Homebrew/pathname+yeast.rb +++ b/Library/Homebrew/pathname+yeast.rb @@ -32,18 +32,19 @@ class Pathname def install src if src.is_a? Array - src.each {|src| install src } + src.collect {|src| install src } elsif File.exist? src mkpath if File.symlink? src # we use the BSD mv command because FileUtils copies the target and # not the link! I'm beginning to wish I'd used Python quite honestly! - `mv #{src} #{to_s}` + raise unless Kernel.system 'mv', src, to_s and $? == 0 else # we mv when possible as it is faster and you should only be using # this function when installing from the temporary build directory FileUtils.mv src, to_s end + return self+src end end