From ec9d5119444f67721d0d7535135a67d01e3a061c Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Fri, 17 Feb 2012 04:30:45 -0600 Subject: [PATCH] Propagate env-shebang to "pristine" command if set for install. --- lib/rubygems/commands/pristine_command.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb index 5479596d73fb..2e281a5338d9 100644 --- a/lib/rubygems/commands/pristine_command.rb +++ b/lib/rubygems/commands/pristine_command.rb @@ -94,10 +94,14 @@ def execute end # TODO use installer options + install_defaults = Gem::ConfigFile::PLATFORM_DEFAULTS['install'] + installer_env_shebang = install_defaults.to_s['--env-shebang'] + installer = Gem::Installer.new(gem, :wrappers => true, :force => true, - :install_dir => spec.base_dir) + :install_dir => spec.base_dir, + :env_shebang => installer_env_shebang) installer.install say "Restored #{spec.full_name}"