core: modify DYLD_LIBRARY_PATH only if executing in installer [GH-2231]

This commit is contained in:
Mitchell Hashimoto 2013-09-20 17:38:49 -07:00
parent 101c6d7694
commit 47120a86a2
2 changed files with 10 additions and 8 deletions

View File

@ -8,6 +8,8 @@ FEATURES:
BUG FIXES:
- core: Don't output `\e[0K` anymore on Windows. [GH-2246]
- core: Only modify `DYLD_LIBRARY_PATH` on Mac when executing commands
in the installer context. [GH-2231]
- hosts/arch: Vagrant won't crash on Arch anymore. [GH-2233]
## 1.3.3 (September 18, 2013)

View File

@ -73,17 +73,17 @@ module Vagrant
process.io.stderr = stderr_writer
process.duplex = true
# 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? && ENV["VAGRANT_ORIGINAL_DYLD_LIBRARY_PATH"]
# If we're in an installer on Mac and we're executing a command
# in the installer context, then force DYLD_LIBRARY_PATH to look
# at our libs first.
if Vagrant.in_installer? && Platform.darwin?
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")
if @command[0].downcase.include?(installer_dir)
@logger.info("Command in the installer. Specifying DYLD_LIBRARY_PATH...")
process.environment["DYLD_LIBRARY_PATH"] =
ENV["VAGRANT_ORIGINAL_DYLD_LIBRARY_PATH"]
"#{installer_dir}/lib:#{ENV["DYLD_LIBRARY_PATH"]}"
else
@logger.debug("Command in installer, not touching env vars.")
@logger.debug("Command not in installer, not touching env vars.")
end
end