1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 04:40:09 +01:00

check-approval: Fix missing license_ids variable

Avoid:

   $ ./script/check-approval MIT
   ./script/check-approval:55:in `<main>': undefined local variable or method `license_ids' for main:Object (NameError)

The license_ids line was added in e505eb8f (check if license is aleady
a license, 2016-01-18, #318), but license_ids was removed from the
helper in b99e7ab0 (replace 'id' variables with 'spdx_lcase' to
minimize confusion, 2016-06-01, #424).  This commit restores the old
code locally, since this script is the only consumer.
This commit is contained in:
W. Trevor King 2018-01-03 10:46:57 -08:00
parent 156babeadf
commit 45369acf79

View File

@ -52,6 +52,7 @@ approvals.each do |approver, licenses|
rows << ["#{approver} approved", licenses.include?(license)] rows << ["#{approver} approved", licenses.include?(license)]
end end
license_ids = licenses.map { |l| l['id'] }
current = license_ids.include?(license) current = license_ids.include?(license)
rows << ['Current license', current] rows << ['Current license', current]