From 7c3b342add3adbd14e7926221f0e8c645b7a54bd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 18 Sep 2013 09:41:57 -0700 Subject: [PATCH] core: restore the old DYLD_LIBRARY_PATH specifically --- lib/vagrant/util/subprocess.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index 0a7f08580..7802bee2e 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -83,11 +83,12 @@ module Vagrant # If we're in the installer and the command is NOT included # in the installer (external), then remove the DYLD_IMPORT_PATH # environmental variable to run into linker issues. [GH-2219] - if Vagrant.in_installer? + if Vagrant.in_installer? && ENV["VAGRANT_ORIGINAL_DYLD_LIBRARY_PATH"] installer_dir = ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"].to_s.downcase if !@command[0].downcase.include?(installer_dir) @logger.info("Command not in the installer. Removing DYLD_LIBRARY_PATH") - process.environment["DYLD_LIBRARY_PATH"] = "" + process.environment["DYLD_LIBRARY_PATH"] = + ENV["VAGRANT_ORIGINAL_DYLD_LIBRARY_PATH"] else @logger.debug("Command in installer, not touching env vars.") end