Jeff Bonhag 2fa44f5b8f
Fixes #11218: Update apk cache when installing rsync (#11220)
This ensures that rsync can be installed on an Alpine Linux machine where the
apk cache may not be current.

Display a warning if the vagrant-alpine plugin is installed, since Alpine guest
support has been merged into Vagrant core.
2019-12-17 12:34:53 -05:00

18 lines
384 B
Ruby

module VagrantPlugins
module GuestAlpine
module Cap
class RSync
def self.rsync_installed(machine)
machine.communicate.test('test -f /usr/bin/rsync')
end
def self.rsync_install(machine)
machine.communicate.tap do |comm|
comm.sudo('apk add --update-cache rsync')
end
end
end
end
end
end