diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index d8fa4528a4..d4727d34e1 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -112,9 +112,7 @@ module Homebrew style_results = Style.check_style_json(style_files, options) if style_files # load licenses spdx = HOMEBREW_LIBRARY_PATH/"data/spdx.json" - spdx_data = File.open(spdx, "r") do |file| - JSON.parse(file.read) - end + spdx_data = JSON.parse(spdx.read) new_formula_problem_lines = [] audit_formulae.sort.each do |f| only = only_cops ? ["style"] : args.only @@ -356,7 +354,7 @@ module Homebrew user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) if @new_formula user ||= nil repo ||= nil - return if user.nil? + return if user.blank? github_license = GitHub.get_repo_license(user, repo) return if github_license && (github_license == formula.license) diff --git a/Library/Homebrew/dev-cmd/update-license-data.rb b/Library/Homebrew/dev-cmd/update-license-data.rb index 7d5c5fdeb9..dde7ed29df 100644 --- a/Library/Homebrew/dev-cmd/update-license-data.rb +++ b/Library/Homebrew/dev-cmd/update-license-data.rb @@ -11,7 +11,7 @@ module Homebrew SPDX_FOLDER_PATH = (HOMEBREW_LIBRARY_PATH/"data").freeze FILE_NAME = "spdx.json" - SPDX_DATA_URL = "https://raw.githubusercontent.com/spdx/license-list-data/master/json/licenses.json" + SPDX_DATA_URL = "https://raw.githubusercontent.com/spdx/license-list-data/HEAD/json/licenses.json" def update_license_data_args Homebrew::CLI::Parser.new do