summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-06 13:21:21 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-06 13:49:47 +0100
commit3d6e6a1a57ce40d2a5da166c8299ab4c3b57aacc (patch)
treea224e4455dcd71a961befb14676a268e0573dd91
parenta7cc4ec87f17e549a1f0fb9063c53a76889426d6 (diff)
downloadbundler-fix_warning_and_readline_crash_on_windows.tar.gz
Properly avoid readline crashes when running specs on Windowsfix_warning_and_readline_crash_on_windows
This also avoids the following warning when running specs on any platform: ``` `/home/deivid/Code/bundler/tmp/1/home` is not a directory. Bundler will use `/tmp/bundler/home/deivid' as your home directory temporarily ```
-rw-r--r--.azure-pipelines/steps.yml6
-rw-r--r--spec/support/rubygems_ext.rb3
2 files changed, 3 insertions, 6 deletions
diff --git a/.azure-pipelines/steps.yml b/.azure-pipelines/steps.yml
index 3c8f2f9512..50e13fb499 100644
--- a/.azure-pipelines/steps.yml
+++ b/.azure-pipelines/steps.yml
@@ -10,12 +10,6 @@ steps:
displayName: 'ruby -v + ridk version'
- script: |
- mkdir tmp
- cd tmp
- mkdir home
- displayName: 'work around readline crash (for https://github.com/bundler/bundler/issues/6902)'
-
-- script: |
bash .azure-pipelines\patch_readline.sh
displayName: 'patch local readline implementation (for https://github.com/bundler/bundler/issues/6907)'
diff --git a/spec/support/rubygems_ext.rb b/spec/support/rubygems_ext.rb
index aee1f85594..9bc3d3ccbe 100644
--- a/spec/support/rubygems_ext.rb
+++ b/spec/support/rubygems_ext.rb
@@ -67,6 +67,9 @@ module Spec
manifest_path.open("w") {|f| f << manifest.join }
end
+ FileUtils.mkdir_p(Path.home)
+ FileUtils.mkdir_p(Path.tmpdir)
+
ENV["HOME"] = Path.home.to_s
ENV["TMPDIR"] = Path.tmpdir.to_s