formula_creator: autodetect license from GitHub when available
This commit is contained in:
parent
793ab30bb0
commit
70c1f39ec0
@ -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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user