mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-19 06:21:41 -04:00
plugin: use API version for loading plugins
While migrating to a unified approach for loading plugins, the API major and minor versions were not added to the constraints for discovering plugins from the environment, leading to Packer potentially considering plugins that are not compatible with itself. This should not be possible, but was due to this omission, which we fix with this commit.
This commit is contained in:
committed by
Lucas Bajolet
parent
7113dea5ef
commit
525b0a7c4c
+4
-2
@@ -77,8 +77,10 @@ func (c *PluginConfig) Discover() error {
|
||||
installations, err := plugingetter.Requirement{}.ListInstallations(plugingetter.ListInstallationsOptions{
|
||||
PluginDirectory: c.PluginDirectory,
|
||||
BinaryInstallationOptions: plugingetter.BinaryInstallationOptions{
|
||||
OS: runtime.GOOS,
|
||||
ARCH: runtime.GOARCH,
|
||||
OS: runtime.GOOS,
|
||||
ARCH: runtime.GOARCH,
|
||||
APIVersionMajor: pluginsdk.APIVersionMajor,
|
||||
APIVersionMinor: pluginsdk.APIVersionMinor,
|
||||
Checksummers: []plugingetter.Checksummer{
|
||||
{Type: "sha256", Hash: sha256.New()},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user