summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorLeo Arnold <github@leoarnold.de>2018-10-10 23:35:48 +0200
committerLeo Arnold <github@leoarnold.de>2018-10-17 15:30:42 +0200
commit4e60117ece710fe99396d4a3f02d6430f7346fa3 (patch)
tree456cc07a39f12d2ba9734a04bca13323d081b6d2 /Rakefile
parenta144e72484ee16fb57a13fb1ba1a54ebefaf5b2e (diff)
downloadbundler-4e60117ece710fe99396d4a3f02d6430f7346fa3.tar.gz
Make RakeTask spec:deps OS agnostic
@segiddins encouraged contributions towards support for Windows https://github.com/bundler/bundler/issues/5992#issuecomment-326809543 As a first step towards this goal this commit fixes file path specification in the first pieces of Ruby code called when setting up a test environment.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index a4e4b19db2..625e6630bf 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,7 +5,8 @@ $:.unshift File.expand_path("../lib", __FILE__)
require "shellwords"
require "benchmark"
-RUBYGEMS_REPO = if `cd .. && git remote --verbose 2>/dev/null` =~ /rubygems/i
+NULL_DEVICE = (Gem.win_platform? ? "NUL" : "/dev/null")
+RUBYGEMS_REPO = if `git -C "#{File.expand_path("..")}" remote --verbose 2> #{NULL_DEVICE}` =~ /rubygems/i
File.expand_path("..")
else
File.expand_path("tmp/rubygems")