command/console: use user-supplied plugin-dir (#22616)
Previously `terraform console` would output an `init required` error if it was run in a directory originally `init`ed with a `-plugin-dir` specified. Fixes #17826
This commit is contained in:
parent
bcc3af8173
commit
f4af55d611
|
@ -40,6 +40,12 @@ func (c *ConsoleCommand) 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
|
||||
}
|
||||
|
||||
var diags tfdiags.Diagnostics
|
||||
|
||||
backendConfig, backendDiags := c.loadBackendConfig(configPath)
|
||||
|
|
Loading…
Reference in New Issue