Scrub LD_LIBRARY_PATH prior to executing VBoxManage

This commit is contained in:
Mitchell Hashimoto 2012-12-16 10:37:43 -08:00
parent 54808f5c79
commit b9f6afd2a0
1 changed files with 2 additions and 0 deletions

View File

@ -327,6 +327,7 @@ module VagrantPlugins
# by just reading stdout and don't expect the OS to just inject
# garbage into it.
old_dyld_lib_path = ENV.delete("DYLD_LIBRARY_PATH")
old_ld_lib_path = ENV.delete("LD_LIBRARY_PATH")
Vagrant::Util::Busy.busy(int_callback) do
Vagrant::Util::Subprocess.execute(@vboxmanage_path, *command, &block)
@ -335,6 +336,7 @@ module VagrantPlugins
# Reset the library path if it was set before. See above comments
# for more information on why this was unset in the first place.
ENV["DYLD_LIBRARY_PATH"] = old_dyld_lib_path if old_dyld_lib_path
ENV["LD_LIBRARY_PATH"] = old_ld_lib_path if old_ld_lib_path
end
end
end