From 664700d0c0451ae4a2006106930803328f53a24e Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Mon, 15 Jan 2024 14:32:46 -0500 Subject: [PATCH] packer: rm support for manually-installed plugins Since we'll be only accepting plugins installed locally along with a shasum, and those that adopt the convention we introduced with required_plugins, we remove support for plugins that only have a packer-plugin-.* type name. --- packer/plugin.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packer/plugin.go b/packer/plugin.go index fe3c71623..246a7e1fe 100644 --- a/packer/plugin.go +++ b/packer/plugin.go @@ -71,24 +71,6 @@ func (c *PluginConfig) Discover() error { return err } - // Manually installed plugins take precedence over all. Duplicate plugins installed - // prior to the packer plugins install command should be removed by user to avoid overrides. - for _, knownFolder := range c.KnownPluginFolders { - pluginPaths, err := c.discoverSingle(filepath.Join(knownFolder, "packer-plugin-*")) - if err != nil { - return err - } - for pluginName, pluginPath := range pluginPaths { - // Test pluginPath points to an executable - if _, err := exec.LookPath(pluginPath); err != nil { - log.Printf("[WARN] %q is not executable; skipping", pluginPath) - continue - } - if err := c.DiscoverMultiPlugin(pluginName, pluginPath); err != nil { - return err - } - } - } return nil }