From 36081df0493c3ea14deeb2182aeb2710fcd646fa Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 25 May 2022 14:18:01 -0500 Subject: [PATCH] Load filedownloader plugin --- builtin/filedownloader/main.go | 2 +- internal/plugin/plugin.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/filedownloader/main.go b/builtin/filedownloader/main.go index c624ae08c..5fb89869e 100644 --- a/builtin/filedownloader/main.go +++ b/builtin/filedownloader/main.go @@ -7,7 +7,7 @@ import ( //go:generate protoc -I ../../.. --go_opt=plugins=grpc --go_out=../../.. vagrant-ruby/builtin/filedownloader/proto/plugin.proto -var CommandOptions = []sdk.Option{ +var PluginOptions = []sdk.Option{ sdk.WithComponents( &downloader.Downloader{}, ), diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index f39e15190..092d092ac 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -15,6 +15,7 @@ import ( "github.com/hashicorp/vagrant-plugin-sdk/core" "github.com/hashicorp/vagrant-plugin-sdk/internal-shared/cacher" "github.com/hashicorp/vagrant-plugin-sdk/internal-shared/cleanup" + "github.com/hashicorp/vagrant/builtin/filedownloader" "github.com/hashicorp/vagrant/builtin/myplugin" "github.com/hashicorp/vagrant/builtin/otherplugin" ) @@ -31,8 +32,9 @@ var ( // Builtins is the map of all available builtin plugins and their // options for launching them. Builtins = map[string][]sdk.Option{ - "myplugin": myplugin.CommandOptions, - "otherplugin": otherplugin.CommandOptions, + "myplugin": myplugin.CommandOptions, + "otherplugin": otherplugin.CommandOptions, + "filedownloader": filedownloader.PluginOptions, } )