summaryrefslogtreecommitdiff
path: root/lib/gitlab/ee_compat_check.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-10-24 20:47:50 +0200
committerRémy Coutable <remy@rymai.me>2016-10-24 20:47:50 +0200
commit402dcab4f1a9e2ea7310e9d6137abe1299f48bf3 (patch)
tree0e2782270eed5a086dbd8afa671f1202bc8c67fa /lib/gitlab/ee_compat_check.rb
parentc7af4cf83027863a2d109ba82135e56092c71a09 (diff)
downloadgitlab-ce-402dcab4f1a9e2ea7310e9d6137abe1299f48bf3.tar.gz
Use File.write instead of File.open + File#write
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/ee_compat_check.rb')
-rw-r--r--lib/gitlab/ee_compat_check.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb
index 6f8d2ca3220..fd9fd56510f 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