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

ruby-changes:65880

From: Kazuhiro <ko1@a...>
Date: Sat, 17 Apr 2021 11:54:39 +0900 (JST)
Subject: [ruby-changes:65880] d953ac1139 (master): Fix writing XDG_CONFIG_HOME in test-bundler

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

From d953ac11394729ef66a4fb44f2eb1383b0ef2e00 Mon Sep 17 00:00:00 2001
From: Kazuhiro NISHIYAMA <zn@m...>
Date: Sat, 17 Apr 2021 11:54:10 +0900
Subject: Fix writing XDG_CONFIG_HOME in test-bundler

https://github.com/ruby/actions/actions/runs/756591173
```
Errno::EACCES: Permission denied @ dir_s_mkdir - /home/runner/.config/irb
```
---
 spec/bundler/commands/console_spec.rb | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/spec/bundler/commands/console_spec.rb b/spec/bundler/commands/console_spec.rb
index aa76096..1a38ce2 100644
--- a/spec/bundler/commands/console_spec.rb
+++ b/spec/bundler/commands/console_spec.rb
@@ -45,6 +45,17 @@ RSpec.describe "bundle console", :bundler => "< 3", :readline => true do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/console_spec.rb#L45
     G
   end
 
+  around :each do |example|
+    require 'tmpdir'
+    Dir.mktmpdir("bundler_commands_console") do |dir|
+      xdg_config_home_backup = ENV.delete("XDG_CONFIG_HOME")
+      ENV["XDG_CONFIG_HOME"] = dir
+      example.run
+    ensure
+      ENV["XDG_CONFIG_HOME"] = xdg_config_home_backup
+    end
+  end
+
   it "starts IRB with the default group loaded" do
     bundle "console" do |input, _, _|
       input.puts("puts RACK")
-- 
cgit v1.1


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

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