pr-pull: fix empty workflow check

workflow_run is an array, which first element is the json
returned by the github API. We need to check that first element
if we want to know if the workflow exists.
This commit is contained in:
Michka Popoff 2020-11-24 23:06:46 +01:00
parent 63dead36cc
commit 76e52ebe62

View File

@ -419,9 +419,10 @@ module Homebrew
)
if args.ignore_missing_artifacts.present? &&
args.ignore_missing_artifacts.include?(workflow) &&
workflow_run.empty?
workflow_run.first.blank?
# Ignore that workflow as it was not executed and we specified
# that we could skip it.
ohai "Ignoring workflow #{workflow} as requested by --ignore-missing-artifacts"
next
end