Sha256: a8aefb0df7ef157f82303cf6b8dc0435784b9e9fc67adbfe68678fcd45cd0667

Contents?: true

Size: 760 Bytes

Versions: 1

Compression:

Stored size: 760 Bytes

Contents

require "log4r"

module VagrantPlugins
  module HyperVNet    
    module Action
      class FolderSync

        def initialize(app, env)
          @app = app
          @logger = Log4r::Logger.new("vagrant::hypervnet::folder_sync")
        end

        def call(env)
          # Continue the middleware chain.
          @app.call(env)

          machine = env[:machine]
          if(machine.config.hypervnet.folder_sync_on_provision)
            env[:ui].output(I18n.t("vagrant_hypervnet.folder_sync"))
            callable = Vagrant::Action::Builder.new
            callable.use Vagrant::Action::Builtin::SyncedFolders
            machine.action_raw(:sync_folders, callable, env)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-hypervnet-0.1.4 lib/vagrant-hypervnet/action/folder_sync.rb