Sha256: b9425c01f4cba7bb4f77f4e49cdb6a1421704627e01d66a4321285074020bbfe

Contents?: true

Size: 471 Bytes

Versions: 2

Compression:

Stored size: 471 Bytes

Contents

module Vagrant
  module Notify
    module Action
      class SetSharedFolder
        def initialize(app, env)
          @app = app
        end

        def call(env)
          host_dir = Pathname("/tmp/vagrant-notify/#{env[:machine].id}")
          FileUtils.mkdir_p host_dir.to_s unless host_dir.exist?
          env[:machine].config.vm.synced_folder host_dir, "/tmp/vagrant-notify", id: "vagrant-notify"
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-notify-0.5.0 lib/vagrant-notify/action/set_shared_folder.rb
vagrant-notify-0.4.0 lib/vagrant-notify/action/set_shared_folder.rb