diff --git a/cmd/cli/app/artifact/artifact_get.go b/cmd/cli/app/artifact/artifact_get.go index 59fe7048df..b7d5e5444b 100644 --- a/cmd/cli/app/artifact/artifact_get.go +++ b/cmd/cli/app/artifact/artifact_get.go @@ -56,6 +56,11 @@ func getCommand(ctx context.Context, cmd *cobra.Command, conn *grpc.ClientConn) return cli.MessageAndError(fmt.Sprintf("Provider %s is not supported yet", provider), fmt.Errorf("invalid argument")) } + // Ensure the output format is supported + if !app.IsOutputFormatSupported(format) { + return cli.MessageAndError(fmt.Sprintf("Output format %s not supported", format), fmt.Errorf("invalid argument")) + } + // check artifact by name art, err := client.GetArtifactById(ctx, &minderv1.GetArtifactByIdRequest{ Context: &minderv1.Context{Provider: &provider, Project: &project},