summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/setup_command.rb1
-rw-r--r--test/rubygems/test_gem_commands_setup_command.rb2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/rubygems/commands/setup_command.rb b/lib/rubygems/commands/setup_command.rb
index 9326496fe6..adceb62dce 100644
--- a/lib/rubygems/commands/setup_command.rb
+++ b/lib/rubygems/commands/setup_command.rb
@@ -418,6 +418,7 @@ By default, this RubyGems will install gem as:
force: options[:force],
install_as_default: true,
bin_dir: bin_dir,
+ install_dir: default_dir,
wrappers: true
).install
ensure
diff --git a/test/rubygems/test_gem_commands_setup_command.rb b/test/rubygems/test_gem_commands_setup_command.rb
index 50f99bc419..08f94d52bf 100644
--- a/test/rubygems/test_gem_commands_setup_command.rb
+++ b/test/rubygems/test_gem_commands_setup_command.rb
@@ -245,6 +245,8 @@ class TestGemCommandsSetupCommand < Gem::TestCase
def test_install_default_bundler_gem_with_destdir_flag
@cmd.extend FileUtils
+ FileUtils.chmod "-w", @gemhome
+
destdir = File.join(@tempdir, 'foo')
bin_dir = File.join(destdir, 'bin')