From 76e52ebe6241dec256e7c62aeb716aee5a9740ea Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Tue, 24 Nov 2020 23:06:46 +0100 Subject: [PATCH] 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. --- Library/Homebrew/dev-cmd/pr-pull.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb index 7e059fc478..4c3317e52c 100644 --- a/Library/Homebrew/dev-cmd/pr-pull.rb +++ b/Library/Homebrew/dev-cmd/pr-pull.rb @@ -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