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

Commit

Permalink
dep: Wording tweaks on ineffectuals error message
Browse files Browse the repository at this point in the history
  • Loading branch information
sdboyer committed Jan 17, 2018
1 parent 2eeefbd commit b89aa7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/dep/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b89aa7e

Please sign in to comment.