diff --git a/cmd/attach.go b/cmd/attach.go index 29ed77a..e19328e 100644 --- a/cmd/attach.go +++ b/cmd/attach.go @@ -206,7 +206,7 @@ var AttachMetaFileCmd = &cobra.Command{ Use: "metafile", Short: "Attach a meta file", Long: "Upload and attach a meta file to a product in the VMware Marketplace", - Example: fmt.Sprintf("%s attach metafile -p hyperspace-database-vm1 -v 1.2.3 --file deploy.sh", AppName), + Example: fmt.Sprintf("%s attach metafile -p hyperspace-database-vm1 -v 1.2.3 --metafile deploy.sh --metafile-type cli", AppName), Args: cobra.NoArgs, PreRunE: RunSerially(ValidateMetaFileType, GetRefreshToken), RunE: func(cmd *cobra.Command, args []string) error { @@ -229,6 +229,7 @@ var AttachMetaFileCmd = &cobra.Command{ return err } + Output.PrintHeader(fmt.Sprintf("Assets for %s %s:", updatedProduct.DisplayName, version.Number)) return Output.RenderAssets(pkg.GetAssets(updatedProduct, version.Number)) }, } diff --git a/cmd/products.go b/cmd/products.go index 2296fe3..f20f293 100644 --- a/cmd/products.go +++ b/cmd/products.go @@ -129,11 +129,11 @@ var ListAssetsCmd = &cobra.Command{ var assets []*pkg.Asset if AssetType == "" { assets = pkg.GetAssets(product, version.Number) - Output.PrintHeader(fmt.Sprintf("Assets for for %s %s:", product.DisplayName, version.Number)) + Output.PrintHeader(fmt.Sprintf("Assets for %s %s:", product.DisplayName, version.Number)) } else { assetType := assetTypeMapping[AssetType] assets = pkg.GetAssetsByType(assetType, product, version.Number) - Output.PrintHeader(fmt.Sprintf("%s assets for for %s %s:", assetType, product.DisplayName, version.Number)) + Output.PrintHeader(fmt.Sprintf("%s assets for %s %s:", assetType, product.DisplayName, version.Number)) } return Output.RenderAssets(assets) diff --git a/test/external/product_list_assets_test.go b/test/external/product_list_assets_test.go index 41c6ac3..8f17a3e 100644 --- a/test/external/product_list_assets_test.go +++ b/test/external/product_list_assets_test.go @@ -48,7 +48,7 @@ var _ = Describe("product list-assets", func() { DefineCommonSteps(define) define.Then(`^the table of charts is printed$`, func() { - Eventually(CommandSession.Out).Should(Say("Chart assets for for NGINX Open Source Helm Chart packaged by Bitnami 1.21.1_0:")) + Eventually(CommandSession.Out).Should(Say("Chart assets for NGINX Open Source Helm Chart packaged by Bitnami 1.21.1_0:")) Eventually(CommandSession.Out).Should(Say("NAME")) Eventually(CommandSession.Out).Should(Say("TYPE")) Eventually(CommandSession.Out).Should(Say("VERSION")) @@ -62,7 +62,7 @@ var _ = Describe("product list-assets", func() { }) define.Then(`^the table of container images is printed$`, func() { - Eventually(CommandSession.Out).Should(Say("Container Image assets for for Cloudian S3 compatible object storage for Tanzu 1.2.1:")) + Eventually(CommandSession.Out).Should(Say("Container Image assets for Cloudian S3 compatible object storage for Tanzu 1.2.1:")) Eventually(CommandSession.Out).Should(Say("NAME")) Eventually(CommandSession.Out).Should(Say("TYPE")) Eventually(CommandSession.Out).Should(Say("VERSION")) @@ -76,7 +76,7 @@ var _ = Describe("product list-assets", func() { }) define.Then(`^the table of virtual machine files is printed$`, func() { - Eventually(CommandSession.Out).Should(Say("VM assets for for NGINX Open Source Virtual Appliance packaged by Bitnami 1.21.0_1:")) + Eventually(CommandSession.Out).Should(Say("VM assets for NGINX Open Source Virtual Appliance packaged by Bitnami 1.21.0_1:")) Eventually(CommandSession.Out).Should(Say("NAME")) Eventually(CommandSession.Out).Should(Say("TYPE")) Eventually(CommandSession.Out).Should(Say("VERSION"))