From 5d4c2d472e9a2ccdc6866e84aff1ed0a3415f0d6 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Sun, 22 Oct 2017 22:29:52 +0200 Subject: use tempfile instead of own random number --- vcs_git.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vcs_git.rb b/vcs_git.rb index 48a6e29..ffdb983 100644 --- a/vcs_git.rb +++ b/vcs_git.rb @@ -21,6 +21,7 @@ require "time" require_relative "log" require "open3" +require 'tempfile' def runcmd *args Open3.popen3(*args) {|i,o,e,t| o.read } @@ -61,15 +62,14 @@ class VCS end def VCS.commit comment - tmpfile = "/tmp/commitcomment.#{rand(10000)}" - File.open(tmpfile,"w"){|f| - f<