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.
This commit is contained in:
Jack Nagel 2014-03-13 11:29:48 -05:00
parent 088c1b550a
commit db08d3017c

View File

@ -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'