Commit 402dcab4 authored by Rémy Coutable's avatar Rémy Coutable

Use File.write instead of File.open + File#write

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent c7af4cf8
...@@ -111,7 +111,7 @@ module Gitlab ...@@ -111,7 +111,7 @@ module Gitlab
output, status = Gitlab::Popen.popen(%w[git format-patch FETCH_HEAD --stdout]) output, status = Gitlab::Popen.popen(%w[git format-patch FETCH_HEAD --stdout])
throw(:halt_check, :ko) unless status.zero? 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) throw(:halt_check, :ko) unless File.exist?(filepath)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment