1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
```
This commit is contained in:
Kazuhiro NISHIYAMA 2021-03-24 15:26:49 +09:00
parent 0927756e58
commit a5b6baae97
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A
2 changed files with 5 additions and 0 deletions

View file

@ -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

View file

@ -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