Skip to content

Commit

Permalink
fix(agentctl): set exit code 1 on non-runnable command (#5717)
Browse files Browse the repository at this point in the history
Signed-off-by: François Gouteroux <[email protected]>
  • Loading branch information
fgouteroux authored Nov 10, 2023
1 parent 70f8e95 commit 867910b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Main (unreleased)

### Bugfixes

- Set exit code 1 on grafana-agentctl non-runnable command. (@fgouteroux)

- Fixed an issue where `loki.process` validation for stage `metric.counter` was
allowing invalid combination of configuration options. (@thampiotr)

Expand Down
4 changes: 3 additions & 1 deletion cmd/grafana-agentctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ func main() {
testLogs(),
)

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

func configSyncCmd() *cobra.Command {
Expand Down

0 comments on commit 867910b

Please sign in to comment.