audit: change location of spdx.json file

This commit is contained in:
lionellloh 2020-06-17 21:45:51 +08:00
parent 03fc6b2c15
commit 3bfca5bcee
3 changed files with 3 additions and 3 deletions

View File

@ -111,8 +111,8 @@ module Homebrew
# Check style in a single batch run up front for performance
style_results = Style.check_style_json(style_files, options) if style_files
# load licenses
path = File.join(File.dirname(__FILE__), "spdx.json")
spdx_ids = JSON.parse(File.open(File.expand_path(path)).read)
full_path = File.join(File.dirname(__FILE__), "../data/spdx.json")
spdx_ids = JSON.parse(File.open(full_path).read)
new_formula_problem_lines = []
audit_formulae.sort.each do |f|
only = only_cops ? ["style"] : args.only

View File

@ -97,7 +97,7 @@ module Homebrew
describe "#audit_license" do
let(:spdx_ids) {
full_path = File.join(File.expand_path(File.dirname(__FILE__) + "../../../dev-cmd/"), "spdx.json")
full_path = File.join(File.expand_path(File.dirname(__FILE__) + "../../../data/"), "spdx.json")
JSON.parse(File.open(full_path).read)
}