summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-06-07 22:24:11 +0900
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-06-08 00:34:59 +0900
commit465e5de5107da7e280902de581ee29c6f0cd1abc (patch)
treeb754e8baf63777033061e5fe164d22ee27d1022b /lib/ci
parent431d7972b6d0f492bd82004b80d426f2e2cff6a5 (diff)
downloadgitlab-ce-465e5de5107da7e280902de581ee29c6f0cd1abc.tar.gz
Fix condition
Diffstat (limited to 'lib/ci')
-rw-r--r--lib/ci/gitlab_ci_yaml_processor.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb
index 738ff474596..bd3ce40ca4b 100644
--- a/lib/ci/gitlab_ci_yaml_processor.rb
+++ b/lib/ci/gitlab_ci_yaml_processor.rb
@@ -208,12 +208,14 @@ module Ci
def matching?(patterns, ref, tag, source)
patterns.any? do |pattern|
pattern, path = pattern.split('@', 2)
- unmatches_path?(path) && matches_pattern?(pattern, ref, tag, source)
+ matches_path?(path) && matches_pattern?(pattern, ref, tag, source)
end
end
- def unmatches_path?(path)
- path && path != self.path
+ def matches_path?(path)
+ return true unless path
+
+ path == self.path
end
def matches_pattern?(pattern, ref, tag, source)