Output PKG contents if no version can be found.
This commit is contained in:
parent
d6f30a4bc1
commit
3b524a04c2
@ -213,22 +213,22 @@ module Homebrew
|
|||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
||||||
if packages.count == 1
|
|
||||||
package_info_path = extract_dir/"PackageInfo"
|
package_info_path = extract_dir/"PackageInfo"
|
||||||
if package_info_path.exist?
|
if package_info_path.exist?
|
||||||
if (version = version_from_package_info(package_info_path))
|
if (version = version_from_package_info(package_info_path))
|
||||||
return version
|
return version
|
||||||
end
|
end
|
||||||
else
|
elsif packages.count == 1
|
||||||
onoe "#{pkg_path.basename} does not contain a `PackageInfo` file:"
|
onoe "#{pkg_path.basename} does not contain a `PackageInfo` file."
|
||||||
$stderr.puts Pathname.glob(extract_dir/"**/*")
|
|
||||||
next
|
|
||||||
end
|
end
|
||||||
else
|
|
||||||
opoo "Skipping, #{pkg_path.basename} contains multiple packages (#{packages.join(", ")}):"
|
opoo "#{pkg_path.basename} contains multiple packages: (#{packages.join(", ")})" if packages.count != 1
|
||||||
|
|
||||||
$stderr.puts Pathname.glob(extract_dir/"**/*")
|
$stderr.puts Pathname.glob(extract_dir/"**/*")
|
||||||
next
|
.map { |path|
|
||||||
end
|
regex = %r{\A(.*?\.(app|qlgenerator|saver|plugin|kext|bundle|osax))/.*\Z}
|
||||||
|
path.to_s.sub(regex, '\1')
|
||||||
|
}.uniq
|
||||||
ensure
|
ensure
|
||||||
Cask::Utils.gain_permissions_remove(extract_dir)
|
Cask::Utils.gain_permissions_remove(extract_dir)
|
||||||
extract_dir.mkpath
|
extract_dir.mkpath
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user