mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Update cloudplugin type casting to simplify adding future versions
This commit is contained in:
parent
2c3d134705
commit
9bb566dcdb
@ -69,7 +69,13 @@ func (c *CloudCommand) proxy(args []string, stdout, stderr io.Writer) int {
|
||||
}
|
||||
|
||||
// Proxy the request
|
||||
cloud1 := raw.(cloudplugin.Cloud1)
|
||||
// Note: future changes will need to determine the type of raw when
|
||||
// multiple versions are possible.
|
||||
cloud1, ok := raw.(cloudplugin.Cloud1)
|
||||
if !ok {
|
||||
c.Ui.Error("If more than one cloudplugin versions are available, they need to be added to the cloud command. This is a bug in terraform.")
|
||||
return ExitRPCError
|
||||
}
|
||||
return cloud1.Execute(args, stdout, stderr)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user