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

ruby-changes:65501

From: Kazuhiro <ko1@a...>
Date: Thu, 18 Mar 2021 18:09:15 +0900 (JST)
Subject: [ruby-changes:65501] 85f99f4b71 (master): Try to fix errors in TestIRB::TestHistory too

https://git.ruby-lang.org/ruby.git/commit/?id=85f99f4b71

From 85f99f4b715a5954124d5014002c16652995b128 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Thu, 18 Mar 2021 18:07:18 +0900
Subject: Try to fix errors in TestIRB::TestHistory too

https://github.com/ruby/actions/runs/2137935523?check_suite_focus=true#step:9:562
```
  1) Error:
TestIRB::TestHistory#test_history_concurrent_use:
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `mkdir'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:253:in `fu_mkdir'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:231:in `block (2 levels) in mkdir_p'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `reverse_each'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:229:in `block in mkdir_p'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `each'
    /home/runner/work/actions/actions/ruby/lib/fileutils.rb:211:in `mkdir_p'
    /home/runner/work/actions/actions/ruby/lib/irb/init.rb:355:in `rc_file_generators'
    /home/runner/work/actions/actions/ruby/lib/irb/init.rb:330:in `rc_file'
    /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:170:in `block in assert_history'
    /home/runner/work/actions/actions/ruby/lib/tmpdir.rb:96:in `mktmpdir'
    /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:168:in `assert_history'
    /home/runner/work/actions/actions/ruby/test/irb/test_history.rb:133:in `test_history_concurrent_use'
```
---
 test/irb/test_history.rb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb
index aad8952..81b7fe8 100644
--- a/test/irb/test_history.rb
+++ b/test/irb/test_history.rb
@@ -163,6 +163,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_history.rb#L163
     def assert_history(expected_history, initial_irb_history, input)
       backup_verbose, $VERBOSE = $VERBOSE, nil
       backup_home = ENV["HOME"]
+      backup_xdg_config_home = ENV.delete("XDG_CONFIG_HOME")
       IRB.conf[:LC_MESSAGES] = IRB::Locale.new
       actual_history = nil
       Dir.mktmpdir("test_irb_history_#{$$}") do |tmpdir|
@@ -196,6 +197,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_history.rb#L197
     ensure
       $VERBOSE = backup_verbose
       ENV["HOME"] = backup_home
+      ENV["XDG_CONFIG_HOME"] = backup_xdg_config_home
     end
 
     def with_temp_stdio
-- 
cgit v1.1


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

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