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

ruby-changes:65640

From: Kazuhiro <ko1@a...>
Date: Wed, 24 Mar 2021 15:29:00 +0900 (JST)
Subject: [ruby-changes:65640] a5b6baae97 (master): Fix test-bundler failures when XDG_CONFIG_HOME is not writable

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

From a5b6baae97a31f24483b2b59744799852bacc7d1 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Wed, 24 Mar 2021 15:26:49 +0900
Subject: Fix test-bundler failures when XDG_CONFIG_HOME is not writable

https://github.com/ruby/actions/runs/2175399707?check_suite_focus=true
```
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
```
---
 spec/bundler/support/path.rb         | 4 ++++
 spec/bundler/support/rubygems_ext.rb | 1 +
 2 files changed, 5 insertions(+)

diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb
index 56d3c71..62f136a 100644
--- a/spec/bundler/support/path.rb
+++ b/spec/bundler/support/path.rb
@@ -193,6 +193,10 @@ module Spec https://github.com/ruby/ruby/blob/trunk/spec/bundler/support/path.rb#L193
       root.join("lib")
     end
 
+    def xdg_config_home
+      home(".config")
+    end
+
     def global_plugin_gem(*args)
       home ".bundle", "plugin", "gems", *args
     end
diff --git a/spec/bundler/support/rubygems_ext.rb b/spec/bundler/support/rubygems_ext.rb
index 55f20ff..5942988 100644
--- a/spec/bundler/support/rubygems_ext.rb
+++ b/spec/bundler/support/rubygems_ext.rb
@@ -33,6 +33,7 @@ module Spec https://github.com/ruby/ruby/blob/trunk/spec/bundler/support/rubygems_ext.rb#L33
 
       ENV["HOME"] = Path.home.to_s
       ENV["TMPDIR"] = Path.tmpdir.to_s
+      ENV["XDG_CONFIG_HOME"] = Path.xdg_config_home.to_s
 
       require "rubygems/user_interaction"
       Gem::DefaultUserInteraction.ui = Gem::SilentUI.new
-- 
cgit v1.1


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

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