diff --git a/pkg/cmd/package/nuget/create/create.go b/pkg/cmd/package/nuget/create/create.go index dd466cb3..e7718d03 100644 --- a/pkg/cmd/package/nuget/create/create.go +++ b/pkg/cmd/package/nuget/create/create.go @@ -151,14 +151,15 @@ func createRun(cmd *cobra.Command, opts *NuPkgCreateOptions) error { } nuget, err := pack.BuildPackage(opts.PackageCreateOptions, outFilePath) - if (nuget != nil) { + if nuget != nil { switch outputFormat { - case constants.OutputFormatBasic: - cmd.Printf("%s\n", nuget.Name()) - case constants.OutputFormatJson: - cmd.Printf(`{"Path": "%s"}`, nuget.Name()) - default: // table - cmd.Printf("Successfully created package %s\n", nuget.Name()) + case constants.OutputFormatBasic: + cmd.Printf("%s\n", nuget.Name()) + case constants.OutputFormatJson: + cmd.Printf(`{"Path":"%s"}`, nuget.Name()) + cmd.Println() + default: // table + cmd.Printf("Successfully created package %s\n", nuget.Name()) } } return err diff --git a/pkg/cmd/package/zip/create/create.go b/pkg/cmd/package/zip/create/create.go index 21c7be04..8b50471a 100644 --- a/pkg/cmd/package/zip/create/create.go +++ b/pkg/cmd/package/zip/create/create.go @@ -78,14 +78,15 @@ func createRun(cmd *cobra.Command, opts *pack.PackageCreateOptions) error { outFilePath := pack.BuildOutFileName("zip", opts.Id.Value, opts.Version.Value) zip, err := pack.BuildPackage(opts, outFilePath) - if (zip != nil) { + if zip != nil { switch outputFormat { - case constants.OutputFormatBasic: - cmd.Printf("%s\n", zip.Name()) - case constants.OutputFormatJson: - cmd.Printf(`{"Path": "%s"}`, zip.Name()) - default: // table - cmd.Printf("Successfully created package %s\n", zip.Name()) + case constants.OutputFormatBasic: + cmd.Printf("%s\n", zip.Name()) + case constants.OutputFormatJson: + cmd.Printf(`{"Path":"%s"}`, zip.Name()) + cmd.Println() + default: // table + cmd.Printf("Successfully created package %s\n", zip.Name()) } } return err