From 0cbd51c3656a8121f6997e79a125767be4fa8c50 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 26 Jun 2017 18:28:45 -0400 Subject: [PATCH] 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. --- command/import.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/command/import.go b/command/import.go index 1f0e18602b..ddb416d597 100644 --- a/command/import.go +++ b/command/import.go @@ -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))