Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit b89aa7e

Browse files
committed
dep: Wording tweaks on ineffectuals error message
1 parent 2eeefbd commit b89aa7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/dep/ensure.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ func (cmd *ensureCommand) Run(ctx *dep.Ctx, args []string) error {
207207
ctx.Err.Printf("they are not imported in any .go files, nor are they in the 'required' list in\n")
208208
ctx.Err.Printf("%s. Dep only applies [[constraint]] rules to direct dependencies, so\n", dep.ManifestName)
209209
ctx.Err.Printf("these rules will have no effect.\n\n")
210-
ctx.Err.Printf("Either or import/require packages from these projects to make them into direct\n")
211-
ctx.Err.Printf("dependencies, or convert the [[constraint]] to an [[override]] to enforce rules\n")
212-
ctx.Err.Printf("on these projects if they are transitive dependencies,\n\n")
210+
ctx.Err.Printf("Either import/require packages from these projects so that they become direct\n")
211+
ctx.Err.Printf("dependencies, or convert each [[constraint]] to an [[override]] to enforce rules\n")
212+
ctx.Err.Printf("on these projects, if they happen to be transitive dependencies,\n\n")
213213
}
214214

215215
if cmd.add {
@@ -529,7 +529,7 @@ func (cmd *ensureCommand) runAdd(ctx *dep.Ctx, args []string, p *dep.Project, sm
529529
}
530530

531531
inManifest := p.Manifest.HasConstraintsOn(pc.Ident.ProjectRoot)
532-
inImports := exrmap[pc.Ident.ProjectRoot]
532+
inImports := exmap[string(pc.Ident.ProjectRoot)]
533533
if inManifest && inImports {
534534
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)
535535
return

0 commit comments

Comments
 (0)