Skip to content

Commit

Permalink
return non-zero exit code due error (YDBOPS-10474)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Lopatin committed Sep 30, 2024
1 parent 79ad923 commit 27a50bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,9 @@ func main() {
_ = logger.Sync()
}()
cmd.InitRootCommandTree(root, factory)
_ = root.Execute()
err := root.Execute()
if err != nil {
os.Exit(1)

Check failure on line 75 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

exitAfterDefer: os.Exit will exit, and `defer func(){...}(...)` will not run (gocritic)
}

Check failure on line 77 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

File is not `gofumpt`-ed (gofumpt)
}

Check failure on line 78 in main.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unnecessary trailing newline (whitespace)

0 comments on commit 27a50bd

Please sign in to comment.