Skip to content

Commit

Permalink
command/console: use user-supplied plugin-dir (#22616)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mildwonkey authored Aug 28, 2019
1 parent bcc3af8 commit f4af55d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f4af55d

Please sign in to comment.