Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .chloggen/cobra-cli-error-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: bug_fix
component: cmd/builder
note: Fix duplicate error output when CLI command execution fails in the builder tool.
issues: [14436]
4 changes: 4 additions & 0 deletions .chloggen/cobra-cli-error-mdatagen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: bug_fix
component: cmd/mdatagen
note: Fix duplicate error output when CLI command execution fails in the mdatagen tool.
issues: [14436]
7 changes: 6 additions & 1 deletion cmd/builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
package main

import (
"os"

"github.com/spf13/cobra"

"go.opentelemetry.io/collector/cmd/builder/internal"
Expand All @@ -12,5 +14,8 @@ import (
func main() {
cmd, err := internal.Command()
cobra.CheckErr(err)
cobra.CheckErr(cmd.Execute())

if err := cmd.Execute(); err != nil {
os.Exit(1)
}
}
7 changes: 6 additions & 1 deletion cmd/mdatagen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ package main
//go:generate mdatagen metadata.yaml

import (
"os"

"github.com/spf13/cobra"

"go.opentelemetry.io/collector/cmd/mdatagen/internal"
Expand All @@ -14,5 +16,8 @@ import (
func main() {
cmd, err := internal.NewCommand()
cobra.CheckErr(err)
cobra.CheckErr(cmd.Execute())

if err := cmd.Execute(); err != nil {
os.Exit(1)
}
}
Loading