Merge pull request #8597 from dtrodrigues/creator-license

formula_creator: autodetect license from GitHub when available
This commit is contained in:
Mike McQuaid 2020-09-04 08:57:44 +01:00 committed by GitHub
commit 5588beb3db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,7 @@ module Homebrew
metadata = GitHub.repository(@user, @name) metadata = GitHub.repository(@user, @name)
@desc = metadata["description"] @desc = metadata["description"]
@homepage = metadata["homepage"] @homepage = metadata["homepage"]
@license = metadata["license"]["spdx_id"] if metadata["license"]
rescue GitHub::HTTPNotFoundError rescue GitHub::HTTPNotFoundError
# If there was no repository found assume the network connection is at # If there was no repository found assume the network connection is at
# fault rather than the input URL. # fault rather than the input URL.