mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-26 23:37:08 -05:00
versionsapi: fix list command by allowing empty set of patch versions for a given minor version (#1609)
This commit is contained in:
parent
8f17e4b9df
commit
2ca2dbae22
@ -12,12 +12,13 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/edgelesssys/constellation/v2/internal/logger"
|
|
||||||
"github.com/edgelesssys/constellation/v2/internal/versionsapi"
|
|
||||||
verclient "github.com/edgelesssys/constellation/v2/internal/versionsapi/client"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"go.uber.org/zap/zapcore"
|
"go.uber.org/zap/zapcore"
|
||||||
"golang.org/x/mod/semver"
|
"golang.org/x/mod/semver"
|
||||||
|
|
||||||
|
"github.com/edgelesssys/constellation/v2/internal/logger"
|
||||||
|
"github.com/edgelesssys/constellation/v2/internal/versionsapi"
|
||||||
|
verclient "github.com/edgelesssys/constellation/v2/internal/versionsapi/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newListCmd() *cobra.Command {
|
func newListCmd() *cobra.Command {
|
||||||
@ -137,10 +138,6 @@ func listPatchVersions(ctx context.Context, client *verclient.Client, ref string
|
|||||||
return nil, fmt.Errorf("listing patch versions: %w", err)
|
return nil, fmt.Errorf("listing patch versions: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(list.Versions) == 0 {
|
|
||||||
return nil, fmt.Errorf("no versions found")
|
|
||||||
}
|
|
||||||
|
|
||||||
patchVers = append(patchVers, list.StructuredVersions()...)
|
patchVers = append(patchVers, list.StructuredVersions()...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user