Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/build/rules.rb')
-rw-r--r--lib/gitlab/ci/build/rules.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/ci/build/rules.rb b/lib/gitlab/ci/build/rules.rb
index 2d4f9cf635b..dee95534b07 100644
--- a/lib/gitlab/ci/build/rules.rb
+++ b/lib/gitlab/ci/build/rules.rb
@@ -6,7 +6,7 @@ module Gitlab
class Rules
include ::Gitlab::Utils::StrongMemoize
- Result = Struct.new(:when, :start_in, :allow_failure, :variables) do
+ Result = Struct.new(:when, :start_in, :allow_failure, :variables, :errors) do
def build_attributes
{
when: self.when,
@@ -38,6 +38,8 @@ module Gitlab
else
Result.new('never')
end
+ rescue Rule::Clause::ParseError => e
+ Result.new('never', nil, nil, nil, [e.message])
end
private