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