Add -json flag to publish list|show

Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
Joshua Colson
2021-09-21 18:46:59 -07:00
committed by Lorenzo Bolla
parent 129eb8644d
commit 899ed92ebc
11 changed files with 302 additions and 52 deletions
-2
View File
@@ -131,7 +131,6 @@ func aptlySnapshotShowJson(cmd *commander.Command, args []string) error {
}
// include packages if requested
// packageList := []string{}
if withPackages {
if snapshot.RefList() != nil {
var list *deb.PackageList
@@ -147,7 +146,6 @@ func aptlySnapshotShowJson(cmd *commander.Command, args []string) error {
}
}
// merge the repo object with the package list
var output []byte
if output, err = json.MarshalIndent(snapshot, "", " "); err == nil {
fmt.Println(string(output))