diff options
author | Nick Thomas <nick@gitlab.com> | 2019-07-04 14:12:17 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-07-04 14:12:17 +0300 |
commit | 59558bb94f15e323142dfe64e17c4477ee2565d1 (patch) | |
tree | 58edbeb82d82e55187fa2dba0af83d7593c221b2 | |
parent | fcdbaedc8d6c73fa80e8192d53b0017f60012402 (diff) |
Update lib/gdk/erb_renderer.rb
-rw-r--r-- | lib/gdk/erb_renderer.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gdk/erb_renderer.rb b/lib/gdk/erb_renderer.rb index 8029474df29..2b2a07ba100 100644 --- a/lib/gdk/erb_renderer.rb +++ b/lib/gdk/erb_renderer.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require 'erb' +require 'fileutils' require 'tempfile' module GDK @@ -24,7 +25,7 @@ module GDK render!(temp_file.path) - return File.rename(temp_file.path, target) unless File.exist?(target) + return FileUtils.mv(temp_file.path, target) unless File.exist?(target) warn!(temp_file) unless FileUtils.identical?(target, temp_file.path) ensure |