diff options
| author | Jack Nagel | 2013-08-14 22:14:34 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-08-14 22:15:07 -0500 |
| commit | ccbac62677c07ba3d9d26171cb9fed2e4446e417 (patch) | |
| tree | dcf759e4b70e50a4511d078ca9daa4f4dae1dccd /Library/Contributions/cmd | |
| parent | 69058bd67fd5477c19c76d30710dca7ef9bed6b0 (diff) | |
| download | brew-ccbac62677c07ba3d9d26171cb9fed2e4446e417.tar.bz2 | |
unpack: don't attempt to chdir into regular files
Diffstat (limited to 'Library/Contributions/cmd')
| -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 |
