diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb index 6f8d2ca322025e55a185b76b4cf5be64aa68a977..fd9fd56510f42463f83531c476978507fb390e65 100644 --- a/lib/gitlab/ee_compat_check.rb +++ b/lib/gitlab/ee_compat_check.rb @@ -111,7 +111,7 @@ module Gitlab output, status = Gitlab::Popen.popen(%w[git format-patch FETCH_HEAD --stdout]) throw(:halt_check, :ko) unless status.zero? - File.open(filepath, 'w+') { |f| f.write(output) } + File.write(filepath, output) throw(:halt_check, :ko) unless File.exist?(filepath) end