mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
find -plugin-dir during import
The import command wasn't loading the plugin path at all, relying on the local directory for binaries. Load the plugin dir into Meta, and pass in ForceLocal for consistency. The Backend returned was going to be a Local anyway, so the added check wasn't ensuring anything.
This commit is contained in:
parent
8e25830554
commit
0cbd51c365
@ -112,9 +112,16 @@ func (c *ImportCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// Check for user-supplied plugin path
|
||||
if c.pluginPath, err = c.loadPluginPath(); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error loading plugin path: %s", err))
|
||||
return 1
|
||||
}
|
||||
|
||||
// Load the backend
|
||||
b, err := c.Backend(&BackendOpts{
|
||||
Config: mod.Config(),
|
||||
Config: mod.Config(),
|
||||
ForceLocal: true,
|
||||
})
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Failed to load backend: %s", err))
|
||||
|
Loading…
Reference in New Issue
Block a user