mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-22 11:08:20 +00:00
Resolve PR #976 review comments
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
1 parent
899ed92ebc
commit
0bc66032d2
5 files changed
+68
-47
No files matched your search
@@ -29,8 +29,6 @@ func aptlySnapshotShowTxt(cmd *commander.Command, args []string) error {
|
||||
var err error
|
||||
name := args[0]
|
||||
|
||||
withPackages := context.Flags().Lookup("with-packages").Value.Get().(bool)
|
||||
|
||||
snapshot, err := context.CollectionFactory().SnapshotCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to show: %s", err)
|
||||
@@ -78,6 +76,7 @@ func aptlySnapshotShowTxt(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
withPackages := context.Flags().Lookup("with-packages").Value.Get().(bool)
|
||||
if withPackages {
|
||||
ListPackagesRefList(snapshot.RefList())
|
||||
}
|
||||
@@ -90,8 +89,6 @@ func aptlySnapshotShowJson(cmd *commander.Command, args []string) error {
|
||||
|
||||
name := args[0]
|
||||
|
||||
withPackages := context.Flags().Lookup("with-packages").Value.Get().(bool)
|
||||
|
||||
snapshot, err := context.CollectionFactory().SnapshotCollection().ByName(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to show: %s", err)
|
||||
@@ -131,6 +128,7 @@ func aptlySnapshotShowJson(cmd *commander.Command, args []string) error {
|
||||
}
|
||||
|
||||
// include packages if requested
|
||||
withPackages := context.Flags().Lookup("with-packages").Value.Get().(bool)
|
||||
if withPackages {
|
||||
if snapshot.RefList() != nil {
|
||||
var list *deb.PackageList
|
||||
|
||||
Reference in new issue
Block a user