Extract package into new temporary directory.
This commit is contained in:
parent
ef1ea75c08
commit
a3182a6386
@ -198,7 +198,10 @@ module Homebrew
|
||||
.uniq
|
||||
|
||||
if packages.count == 1
|
||||
extract_dir = dir/pkg_path.stem
|
||||
Dir.mktmpdir do |extract_dir|
|
||||
extract_dir = Pathname(extract_dir)
|
||||
FileUtils.rmdir extract_dir
|
||||
|
||||
system_command! "pkgutil", args: ["--expand-full", pkg_path, extract_dir]
|
||||
|
||||
package_info_path = extract_dir/"PackageInfo"
|
||||
@ -210,7 +213,7 @@ module Homebrew
|
||||
onoe "#{pkg_path.basename} does not contain a `PackageInfo` file."
|
||||
next
|
||||
end
|
||||
|
||||
end
|
||||
else
|
||||
opoo "Skipping, #{pkg_path.basename} contains multiple packages."
|
||||
next
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user