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

Commit e2f7895

Browse files
committed
runProjectStatue: add PACKAGES
1 parent e13a67e commit e2f7895

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cmd/dep/status.go

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"io/ioutil"
1414
"log"
1515
"sort"
16+
"strings"
1617
"sync"
1718
"text/tabwriter"
1819

@@ -658,7 +659,7 @@ type projectStatus struct {
658659
Revision string
659660
LatestAllowed string
660661
SourceType string
661-
Packages string
662+
Packages []string
662663
ProjectImporters map[string]string
663664
PackageImporters map[string]string
664665
UpstreamExists bool
@@ -683,7 +684,8 @@ UPSTREAM EXISTS: %t
683684
UPSTREAM VERSION EXISTS: %t
684685
`,
685686
ps.Project, ps.Version, ps.Constraints, ps.Source, ps.AltSource,
686-
ps.PubVersions, ps.Revision, ps.LatestAllowed, ps.SourceType, ps.Packages,
687+
ps.PubVersions, ps.Revision, ps.LatestAllowed, ps.SourceType,
688+
strings.Join(ps.Packages, ", "),
687689
ps.ProjectImporters, ps.PackageImporters, ps.UpstreamExists,
688690
ps.UpstreamVersionExists)
689691
}
@@ -741,6 +743,15 @@ func runProjectStatus(ctx *dep.Ctx, args []string, p *dep.Project, sm gps.Source
741743
break
742744
}
743745
}
746+
747+
pkgtree, err := sm.ListPackages(pl.Ident(), pl.Version())
748+
if err != nil {
749+
return err
750+
}
751+
752+
for pkgPath := range pkgtree.Packages {
753+
projStatus.Packages = append(projStatus.Packages, pkgPath)
754+
}
744755
}
745756
}
746757

0 commit comments

Comments
 (0)