diff --git a/cmd/dep/status.go b/cmd/dep/status.go index 02c14e426c..59b49c1f54 100644 --- a/cmd/dep/status.go +++ b/cmd/dep/status.go @@ -352,11 +352,13 @@ func runStatusAll(ctx *dep.Ctx, out outputter, p *dep.Project, sm gps.SourceMana if bs.Version != nil && bs.Version.Type() != gps.IsVersion { c, has := p.Manifest.Constraints[proj.Ident().ProjectRoot] if !has { - c.Constraint = gps.Any() + // Get constraint for locked project + for _, lockedP := range p.Lock.P { + if lockedP.Ident().ProjectRoot == proj.Ident().ProjectRoot { + c.Constraint = lockedP.Version() + } + } } - // TODO: This constraint is only the constraint imposed by the - // current project, not by any transitive deps. As a result, - // transitive project deps will always show "any" here. bs.Constraint = c.Constraint vl, err := sm.ListVersions(proj.Ident())