summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-06-13 11:02:33 +0200
committerRémy Coutable <remy@rymai.me>2017-06-13 11:53:55 +0200
commitd3521510ce218c57c04d56c84cbe7909b87aa8e0 (patch)
tree442dcba6977e01bcf731ded834fa1ddf40bd4b1c
parent896aa2a1f0a79a18ad1cd7530fa0c6acaa41288d (diff)
downloadgitlab-ce-33600-fix-uncaught-throw-in-ee_compat_check.tar.gz
Fix an uncaught throw in the ee_compat_check job33600-fix-uncaught-throw-in-ee_compat_check
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--lib/gitlab/ee_compat_check.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb
index 6d326ee213a..3401e114b5e 100644
--- a/lib/gitlab/ee_compat_check.rb
+++ b/lib/gitlab/ee_compat_check.rb
@@ -76,9 +76,13 @@ module Gitlab
step(
"Generating the patch against origin/master in #{patch_path}",
- %W[git diff --binary origin/master > #{patch_path}]
+ %W[git diff --binary origin/master]
) do |output, status|
- throw(:halt_check, :ko) unless status.zero? && File.exist?(patch_path)
+ throw(:halt_check, :ko) unless status.zero?
+
+ File.write(patch_path, output)
+
+ throw(:halt_check, :ko) unless File.exist?(patch_path)
end
end