From 006cea45e30c0d4c7ba03ac8877b4bb4ce7d0199 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 9 Oct 2018 16:27:47 -0700 Subject: [PATCH] Provide rgloader for project local plugins --- lib/vagrant/environment.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 8236f67b8..961c16e75 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -906,6 +906,13 @@ module Vagrant begin @logger.debug("Creating: #{@local_data_path}") FileUtils.mkdir_p(@local_data_path) + # Create the rgloader/loader file so we can use encoded files. + loader_file = @local_data_path.join("rgloader", "loader.rb") + if !loader_file.file? + source_loader = Vagrant.source_root.join("templates/rgloader.rb") + FileUtils.mkdir_p(@local_data_path.join("rgloader")) + FileUtils.cp(source_loader.to_s, loader_file.to_s) + end rescue Errno::EACCES raise Errors::LocalDataDirectoryNotAccessible, local_data_path: @local_data_path.to_s