From b89aa7e97679b16b85109eadef02423960f7d814 Mon Sep 17 00:00:00 2001 From: sam boyer Date: Tue, 16 Jan 2018 20:19:28 -0800 Subject: [PATCH] dep: Wording tweaks on ineffectuals error message --- cmd/dep/ensure.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/dep/ensure.go b/cmd/dep/ensure.go index be02379426..202ec35505 100644 --- a/cmd/dep/ensure.go +++ b/cmd/dep/ensure.go @@ -207,9 +207,9 @@ func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error { ctx.Err.Printf("they are not imported in any .go files, nor are they in the 'required' list in\n") ctx.Err.Printf("%s. Dep only applies [[constraint]] rules to direct dependencies, so\n", dep.ManifestName) ctx.Err.Printf("these rules will have no effect.\n\n") - ctx.Err.Printf("Either or import/require packages from these projects to make them into direct\n") - ctx.Err.Printf("dependencies, or convert the [[constraint]] to an [[override]] to enforce rules\n") - ctx.Err.Printf("on these projects if they are transitive dependencies,\n\n") + ctx.Err.Printf("Either import/require packages from these projects so that they become direct\n") + ctx.Err.Printf("dependencies, or convert each [[constraint]] to an [[override]] to enforce rules\n") + ctx.Err.Printf("on these projects, if they happen to be transitive dependencies,\n\n") } if cmd.add { @@ -529,7 +529,7 @@ func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.Project, sm } inManifest := p.Manifest.HasConstraintsOn(pc.Ident.ProjectRoot) - inImports := exrmap[pc.Ident.ProjectRoot] + inImports := exmap[string(pc.Ident.ProjectRoot)] if inManifest && inImports { errCh <- errors.Errorf("nothing to -add, %s is already in %s and the project's direct imports or required list", pc.Ident.ProjectRoot, dep.ManifestName) return