mirror of
https://github.com/slsa-framework/slsa-verifier.git
synced 2026-05-06 00:26:39 +00:00
fix: Expect at least one artifact in verification (#426)
* fix: Expect at least one artifact in verification Fixes #425 introduces by #419 Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com> * go fmt Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com> Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
This commit is contained in:
@@ -32,7 +32,13 @@ func verifyArtifactCmd() *cobra.Command {
|
||||
o := &verify.VerifyOptions{}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "verify-artifact [flags] artifact [artifact..]",
|
||||
Use: "verify-artifact [flags] artifact [artifact..]",
|
||||
Args: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) < 1 {
|
||||
return errors.New("expects at least one artifact")
|
||||
}
|
||||
return nil
|
||||
},
|
||||
Short: "Verifies SLSA provenance on artifact blobs given as arguments (assuming same provenance)",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
v := verify.VerifyArtifactCommand{
|
||||
|
||||
Reference in New Issue
Block a user