Sha256: 6192ad33cf50c4d358c97bd23fec463434b493fcea0fa902128c7e4a739809ec

Contents?: true

Size: 708 Bytes

Versions: 16

Compression:

Stored size: 708 Bytes

Contents

module VagrantPlugins
  module Unison
    module UnisonSync
      def execute_sync_command(machine)
        unison_paths = UnisonPaths.new(@env, machine)
        guest_path = unison_paths.guest
        host_path = unison_paths.host

        @env.ui.info "Unisoning changes from {host}::#{host_path} --> {guest VM}::#{guest_path}"

        # Create the guest path
        machine.communicate.sudo("mkdir -p '#{guest_path}'")
        machine.communicate.sudo("chown #{machine.ssh_info[:username]} '#{guest_path}'")

        ssh_command = SshCommand.new(machine, unison_paths)
        shell_command = ShellCommand.new(machine, unison_paths, ssh_command)

        yield shell_command
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
vagrant-unison2-1.1.0 lib/vagrant-unison2/unison_sync.rb
vagrant-unison2-1.0.3 lib/vagrant-unison2/unison_sync.rb
vagrant-unison2-1.0.2 lib/vagrant-unison2/unison_sync.rb
vagrant-unison2-1.0.1 lib/vagrant-unison2/unison_sync.rb
vagrant-unison2-1.0.0 lib/vagrant-unison/unison_sync.rb
vagrant-unison-morroni-0.0.25 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.24 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.23 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.22 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.21 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.20 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.19 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.18 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.17 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-morroni-0.0.16 lib/vagrant-unison-morroni/unison_sync.rb
vagrant-unison-latest-0.0.16 lib/vagrant-unison/unison_sync.rb