diff --git a/plugins/guests/haiku/cap/rsync.rb b/plugins/guests/haiku/cap/rsync.rb index e465c3800..e0c2112f7 100644 --- a/plugins/guests/haiku/cap/rsync.rb +++ b/plugins/guests/haiku/cap/rsync.rb @@ -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 diff --git a/plugins/guests/haiku/plugin.rb b/plugins/guests/haiku/plugin.rb index 55fa93b75..b000bb616 100644 --- a/plugins/guests/haiku/plugin.rb +++ b/plugins/guests/haiku/plugin.rb @@ -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 diff --git a/test/unit/plugins/guests/haiku/cap/rsync_test.rb b/test/unit/plugins/guests/haiku/cap/rsync_test.rb index 60330521b..b278b3909 100644 --- a/test/unit/plugins/guests/haiku/cap/rsync_test.rb +++ b/test/unit/plugins/guests/haiku/cap/rsync_test.rb @@ -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