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.
pull/12863/head
Lucas Bajolet 2 years ago committed by Lucas Bajolet
parent 94aaff44a1
commit 664700d0c0

@ -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
}

Loading…
Cancel
Save