bin/autoproj_install in autoproj-2.0.0.rc10 vs bin/autoproj_install in autoproj-2.0.0.rc11
- old
+ new
@@ -47,11 +47,11 @@
load_config
@local = false
end
def env_for_child
- env.inject(Hash.new) do |h, (k, v)|
+ result = env.inject(Hash.new) do |h, (k, v)|
h[k] = (v.join(File::PATH_SEPARATOR) if v && !v.empty?)
h
end
end
@@ -96,11 +96,11 @@
# Whether bundler should be installed locally in {#dot_autoproj}
def private_bundler?; !!@private_bundler end
# The path to the directory into which the bundler gem should be
# installed
- def bundler_gem_home; @private_bundler || gem_bindir end
+ def bundler_gem_home; @private_bundler || Gem.user_dir end
# (see #private_bundler?)
def private_bundler=(flag)
@private_bundler =
if flag.respond_to?(:to_str) then File.expand_path(flag)
elsif flag
@@ -110,11 +110,11 @@
# Whether autoproj should be installed locally in {#dot_autoproj}
def private_autoproj?; !!@private_autoproj end
# The path to the directory into which the autoproj gem should be
# installed
- def autoproj_gem_home; @private_autoproj || gem_bindir end
+ def autoproj_gem_home; @private_autoproj || Gem.user_dir end
# (see #private_autoproj?)
def private_autoproj=(flag)
@private_autoproj =
if flag.respond_to?(:to_str) then File.expand_path(flag)
elsif flag
@@ -231,11 +231,11 @@
clean_path = env_for_child['PATH']
STDERR.puts "cannot find 'bundler' in PATH=#{clean_path}#{File::PATH_SEPARATOR}#{gem_bindir}"
STDERR.puts "installing it now ..."
result = system(
- clean_env.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_path),
+ clean_env.merge('GEM_PATH' => "", 'GEM_HOME' => bundler_gem_home),
Gem.ruby, '-S', 'gem', 'install', 'bundler')
if !result
if ENV['PATH'] != clean_path
STDERR.puts " it appears that you already have some autoproj-generated env.sh loaded"
@@ -247,10 +247,10 @@
STDERR.puts " or call this command again with --private-bundler to have it installed in the workspace"
exit 1
end
end
- bundler = File.join(bundler_gem_path, 'bin', 'bundler')
+ bundler = File.join(bundler_gem_home, 'bin', 'bundler')
if File.exist?(bundler)
bundler
else
STDERR.puts "gem install bundler returned successfully, but still cannot find bundler in #{bundler}"
nil