diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2021-03-24 15:26:49 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2021-03-24 15:26:49 +0900 |
commit | a5b6baae97a31f24483b2b59744799852bacc7d1 (patch) | |
tree | 1dab59c71534f5df769bfcf0a8016db90dfe1e1d | |
parent | 0927756e58c7d68517a1468f2327ce50989ff3f2 (diff) |
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
```
-rw-r--r-- | spec/bundler/support/path.rb | 4 | ||||
-rw-r--r-- | spec/bundler/support/rubygems_ext.rb | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/spec/bundler/support/path.rb b/spec/bundler/support/path.rb index 56d3c71f3c..62f136aa0b 100644 --- a/spec/bundler/support/path.rb +++ b/spec/bundler/support/path.rb @@ -193,6 +193,10 @@ module Spec 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 55f20ff29a..59429884d6 100644 --- a/spec/bundler/support/rubygems_ext.rb +++ b/spec/bundler/support/rubygems_ext.rb @@ -33,6 +33,7 @@ module Spec 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 |