From 427414934a8f66d2f7eb619bbbea5f5e38ef75c1 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Mon, 22 Nov 2021 12:22:23 -0300 Subject: [PATCH] fix: alias output to output-signature on sign-blob (#1093) Signed-off-by: Carlos A Becker --- cmd/cosign/cli/options/signblob.go | 2 +- cmd/cosign/cli/sign.go | 2 -- cmd/cosign/cli/signblob.go | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/cosign/cli/options/signblob.go b/cmd/cosign/cli/options/signblob.go index 5263e7806df..e3cdcbb4275 100644 --- a/cmd/cosign/cli/options/signblob.go +++ b/cmd/cosign/cli/options/signblob.go @@ -28,7 +28,7 @@ type SignBlobOptions struct { Base64Output bool Output string // deprecated: TODO remove when the output flag is fully deprecated OutputSignature string // TODO: this should be the root output file arg. - OutputCertificate string // TODO: this should be the root output file arg. + OutputCertificate string SecurityKey SecurityKeyOptions Fulcio FulcioOptions Rekor RekorOptions diff --git a/cmd/cosign/cli/sign.go b/cmd/cosign/cli/sign.go index 01cb4033bd3..0f6ab8ef7c9 100644 --- a/cmd/cosign/cli/sign.go +++ b/cmd/cosign/cli/sign.go @@ -20,7 +20,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - "github.com/spf13/viper" "github.com/sigstore/cosign/cmd/cosign/cli/generate" "github.com/sigstore/cosign/cmd/cosign/cli/options" @@ -29,7 +28,6 @@ import ( func Sign() *cobra.Command { o := &options.SignOptions{} - viper.RegisterAlias("output", "output-signature") cmd := &cobra.Command{ Use: "sign", diff --git a/cmd/cosign/cli/signblob.go b/cmd/cosign/cli/signblob.go index 93c9a162486..ba98587693b 100644 --- a/cmd/cosign/cli/signblob.go +++ b/cmd/cosign/cli/signblob.go @@ -24,10 +24,12 @@ import ( "github.com/sigstore/cosign/cmd/cosign/cli/options" "github.com/sigstore/cosign/cmd/cosign/cli/sign" "github.com/spf13/cobra" + "github.com/spf13/viper" ) func SignBlob() *cobra.Command { o := &options.SignBlobOptions{} + viper.RegisterAlias("output", "output-signature") cmd := &cobra.Command{ Use: "sign-blob",