Sha256: d903ba269b1bac15bfa986398b4e0c2379d67ad65bcc756aed37fc30d14b5d5c
Contents?: true
Size: 761 Bytes
Versions: 13
Compression:
Stored size: 761 Bytes
Contents
module VagrantPlugins module Parallels module Action class RegisterTemplate def initialize(app, env) @app = app end def call(env) pvm_glob = Pathname.glob(env[:machine].box.directory.join('*.pvm')).first # TODO: Handle error cases better, throw a Vagrant error and not a stack trace etc. pvm_file = File.realpath pvm_glob.to_s unless env[:machine].provider.driver.registered?(pvm_file) env[:machine].provider.driver.register(pvm_file.to_s) end # Call the next if we have one (but we shouldn't, since this # middleware is built to run with the Call-type middlewares) @app.call(env) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems