From db08d3017ccdd1a9d6eb1b41d3f87ebd91cbcc3b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 13 Mar 2014 11:29:48 -0500 Subject: [PATCH] brew-unpack: don't chdir further than a normal install would If we want to generate usable patches from inside the unpacked source, then we should start from the same directory that a normal install would start from. --- Library/Contributions/cmd/brew-unpack.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb index 24cfbd419d..c1ca264749 100755 --- a/Library/Contributions/cmd/brew-unpack.rb +++ b/Library/Contributions/cmd/brew-unpack.rb @@ -81,11 +81,7 @@ module Homebrew extend self oh1 "Unpacking #{f.name} to: #{stage_dir}" ENV['VERBOSE'] = '1' # show messages about tar - f.brew do - entries = Dir['*'] - cd entries.first if entries.length == 1 && File.directory?(entries.first) - cp_r getwd, stage_dir - end + f.brew { cp_r getwd, stage_dir } ENV['VERBOSE'] = nil if ARGV.switch? 'g'