diff --git a/command/e2etest/init_test.go b/command/e2etest/init_test.go index 84e8ee378..2451c3c91 100644 --- a/command/e2etest/init_test.go +++ b/command/e2etest/init_test.go @@ -358,7 +358,7 @@ func TestInitProviderNotFound(t *testing.T) { t.Fatal("expected error, got success") } - if !strings.Contains(stderr, "provider registry.terraform.io/hashicorp/nonexist was not\nfound in any of the search locations\n\n- "+pluginDir) { + if !strings.Contains(stderr, "provider registry.terraform.io/hashicorp/nonexist was not\nfound in any of the search locations\n\n - "+pluginDir) { t.Errorf("expected error message is missing from output:\n%s", stderr) } }) diff --git a/command/init.go b/command/init.go index 003cc9d7c..e37e1dad3 100644 --- a/command/init.go +++ b/command/init.go @@ -511,7 +511,7 @@ func (c *InitCommand) getProviders(config *configs.Config, state *states.State, sources := errorTy.Sources displaySources := make([]string, len(sources)) for i, source := range sources { - displaySources[i] = fmt.Sprintf("- %s", source) + displaySources[i] = fmt.Sprintf(" - %s", source) } diags = diags.Append(tfdiags.Sourceless( tfdiags.Error,