diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index 789364b3b..9aa2358be 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -129,10 +129,10 @@ module Vagrant if ENV["VAGRANT_APPIMAGE"] embed_path = Pathname.new(Vagrant.installer_embedded_dir).expand_path.to_s exec_path = Pathname.new(@command[0]).expand_path.to_s - if !exec_path.start_with?(embed_path) && ENV["VAGRANT_APPIMAGE_LD_LIBRARY_PATH"] + if !exec_path.start_with?(embed_path) && ENV["VAGRANT_APPIMAGE_HOST_LD_LIBRARY_PATH"] @logger.info("Detected AppImage environment and request to external binary. Updating library path.") - @logger.debug("Setting LD_LIBRARY_PATH to #{ENV["VAGRANT_APPIMAGE_LD_LIBRARY_PATH"]}") - process.environment["LD_LIBRARY_PATH"] = ENV["VAGRANT_APPIMAGE_LD_LIBRARY_PATH"].to_s + @logger.debug("Setting LD_LIBRARY_PATH to #{ENV["VAGRANT_APPIMAGE_HOST_LD_LIBRARY_PATH"]}") + process.environment["LD_LIBRARY_PATH"] = ENV["VAGRANT_APPIMAGE_HOST_LD_LIBRARY_PATH"].to_s end end else diff --git a/test/unit/vagrant/util/subprocess_test.rb b/test/unit/vagrant/util/subprocess_test.rb index 0fd69818b..81da0e635 100644 --- a/test/unit/vagrant/util/subprocess_test.rb +++ b/test/unit/vagrant/util/subprocess_test.rb @@ -69,7 +69,7 @@ describe Vagrant::Util::Subprocess do allow(process_env).to receive(:[]=) allow(ENV).to receive(:[]).with("VAGRANT_INSTALLER_ENV").and_return("1") allow(ENV).to receive(:[]).with("VAGRANT_APPIMAGE").and_return("1") - allow(ENV).to receive(:[]).with("VAGRANT_APPIMAGE_LD_LIBRARY_PATH").and_return(appimage_ld_path) + allow(ENV).to receive(:[]).with("VAGRANT_APPIMAGE_HOST_LD_LIBRARY_PATH").and_return(appimage_ld_path) allow(File).to receive(:file?).with(exec_path).and_return(true) allow(ChildProcess).to receive(:build).and_return(process) allow(Vagrant).to receive(:installer_embedded_dir).and_return(appimage_path)