diff options
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-unpack.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb index 6e81d8196..e4ff31434 100755 --- a/Library/Contributions/cmd/brew-unpack.rb +++ b/Library/Contributions/cmd/brew-unpack.rb @@ -88,7 +88,8 @@ module Homebrew extend self oh1 "Unpacking #{f.name} to: #{stage_dir}" ENV['VERBOSE'] = '1' # show messages about tar f.brew do - cd Dir['*'][0] if Dir['*'].one? + entries = Dir['*'] + cd entries.first if entries.one? && File.directory?(entries.first) cp_r getwd, stage_dir end ENV['VERBOSE'] = nil |
