diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-06-07 22:24:11 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-06-08 00:34:59 +0900 |
commit | 465e5de5107da7e280902de581ee29c6f0cd1abc (patch) | |
tree | b754e8baf63777033061e5fe164d22ee27d1022b /lib/ci | |
parent | 431d7972b6d0f492bd82004b80d426f2e2cff6a5 (diff) | |
download | gitlab-ce-465e5de5107da7e280902de581ee29c6f0cd1abc.tar.gz |
Fix condition
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 8 |
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) |