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
pull/22625/head
Kristin Laemmert 7 years ago committed by GitHub
parent bcc3af8173
commit f4af55d611
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save