diff --git a/internal/initwd/module_install.go b/internal/initwd/module_install.go index c07591bf7..822bc4f1e 100644 --- a/internal/initwd/module_install.go +++ b/internal/initwd/module_install.go @@ -428,7 +428,7 @@ func (i *ModuleInstaller) installRegistryModule(req *earlyconfig.ModuleRequest, diags = diags.Append(tfdiags.Sourceless( tfdiags.Error, "Failed to download module", - fmt.Sprintf("Error attempting to download module %q (%s:%d) source code from %q: %s.", req.Name, req.CallPos.Filename, req.CallPos.Line, dlAddr, err), + fmt.Sprintf("Could not download module %q (%s:%d) source code from %q: %s.", req.Name, req.CallPos.Filename, req.CallPos.Line, dlAddr, err), )) return nil, nil, diags } @@ -482,7 +482,7 @@ func (i *ModuleInstaller) installGoGetterModule(req *earlyconfig.ModuleRequest, modDir, err := getter.getWithGoGetter(instPath, req.SourceAddr) if err != nil { - if err, ok := err.(*MaybeRelativePathErr); ok { + if _, ok := err.(*MaybeRelativePathErr); ok { log.Printf( "[TRACE] ModuleInstaller: %s looks like a local path but is missing ./ or ../", req.SourceAddr, @@ -507,7 +507,7 @@ func (i *ModuleInstaller) installGoGetterModule(req *earlyconfig.ModuleRequest, diags = diags.Append(tfdiags.Sourceless( tfdiags.Error, "Failed to download module", - fmt.Sprintf("Error attempting to download module %q (%s:%d) source code from %q: %s", req.Name, req.CallPos.Filename, req.CallPos.Line, packageAddr, err), + fmt.Sprintf("Could not download module %q (%s:%d) source code from %q: %s", req.Name, req.CallPos.Filename, req.CallPos.Line, packageAddr, err), )) } return nil, diags