Set rsync_command for Haiku guests
At the time of writing, the Haiku rsync lacks old-style --compress due to its external zlib. Pass `-zz` to the guest rsync. This works with or without the `--compress` flag in the host's `rsync__args`.
This commit is contained in:
parent
a50432cf16
commit
2d4ecfbd23
@ -9,6 +9,10 @@ module VagrantPlugins
|
||||
def self.rsync_install(machine)
|
||||
machine.communicate.execute("pkgman install -y rsync")
|
||||
end
|
||||
|
||||
def self.rsync_command(machine)
|
||||
"rsync -zz"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -40,6 +40,11 @@ module VagrantPlugins
|
||||
require_relative "cap/rsync"
|
||||
Cap::RSync
|
||||
end
|
||||
|
||||
guest_capability(:haiku, :rsync_command) do
|
||||
require_relative "cap/rsync"
|
||||
Cap::RSync
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -35,4 +35,12 @@ describe "VagrantPlugins::GuestHaiku::Cap::RSync" do
|
||||
cap.rsync_installed(machine)
|
||||
end
|
||||
end
|
||||
|
||||
describe ".rsync_command" do
|
||||
let(:cap) { caps.get(:rsync_command) }
|
||||
|
||||
it "defaults to 'rsync -zz'" do
|
||||
expect(cap.rsync_command(machine)).to eq("rsync -zz")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user