[前][次][番号順一覧][スレッド一覧]

ruby-changes:61121

From: David <ko1@a...>
Date: Fri, 8 May 2020 14:14:44 +0900 (JST)
Subject: [ruby-changes:61121] 2efe741902 (master): [rubygems/rubygems] Use a local temporary directory

https://git.ruby-lang.org/ruby.git/commit/?id=2efe741902

From 2efe741902301a6185d7ee1eff91d53b1d527302 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Thu, 2 Apr 2020 19:43:21 +0200
Subject: [rubygems/rubygems] Use a local temporary directory

To make tests more deterministic, since `Dir.tmpdir` sometimes will
return the current directory dependending on the writability of other
paths, and in that case since the current directory is changed by our
tests, tests can fail.

Force a local tmp folder instead, which will always be writable.

https://github.com/rubygems/rubygems/commit/3e522bac65

diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index 651e89d..6e9c50d 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -300,6 +300,7 @@ class Gem::TestCase < Minitest::Test https://github.com/ruby/ruby/blob/trunk/lib/rubygems/test_case.rb#L300
     ENV['GEM_VENDOR'] = nil
     ENV['GEMRC'] = nil
     ENV['SOURCE_DATE_EPOCH'] = nil
+    ENV["TMPDIR"] = File.expand_path("tmp")
 
     @current_dir = Dir.pwd
     @fetcher     = nil
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]