Merge pull request #10647 from chrisroberts/f-appimage-ld
Use ld path with appimage libs on suffix
This commit is contained in:
commit
26d05130c4
|
@ -129,10 +129,10 @@ module Vagrant
|
||||||
if ENV["VAGRANT_APPIMAGE"]
|
if ENV["VAGRANT_APPIMAGE"]
|
||||||
embed_path = Pathname.new(Vagrant.installer_embedded_dir).expand_path.to_s
|
embed_path = Pathname.new(Vagrant.installer_embedded_dir).expand_path.to_s
|
||||||
exec_path = Pathname.new(@command[0]).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.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"]}")
|
@logger.debug("Setting LD_LIBRARY_PATH to #{ENV["VAGRANT_APPIMAGE_HOST_LD_LIBRARY_PATH"]}")
|
||||||
process.environment["LD_LIBRARY_PATH"] = ENV["VAGRANT_APPIMAGE_LD_LIBRARY_PATH"].to_s
|
process.environment["LD_LIBRARY_PATH"] = ENV["VAGRANT_APPIMAGE_HOST_LD_LIBRARY_PATH"].to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -69,7 +69,7 @@ describe Vagrant::Util::Subprocess do
|
||||||
allow(process_env).to receive(:[]=)
|
allow(process_env).to receive(:[]=)
|
||||||
allow(ENV).to receive(:[]).with("VAGRANT_INSTALLER_ENV").and_return("1")
|
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").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(File).to receive(:file?).with(exec_path).and_return(true)
|
||||||
allow(ChildProcess).to receive(:build).and_return(process)
|
allow(ChildProcess).to receive(:build).and_return(process)
|
||||||
allow(Vagrant).to receive(:installer_embedded_dir).and_return(appimage_path)
|
allow(Vagrant).to receive(:installer_embedded_dir).and_return(appimage_path)
|
||||||
|
|
Loading…
Reference in New Issue