diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2022-08-18 10:40:36 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2022-08-18 10:40:36 +0300 |
commit | 11373b2d400e53a5f29691db8dee401ad1142104 (patch) | |
tree | 1c19cebca5ad828ed2e6691e01e112e227dd9d78 | |
parent | bb4376f98acdf012abd74ebb3e9b77b93aaf3b57 (diff) | |
parent | 33d3865e74d1f4b83f478516612660440fdbb3d9 (diff) |
Merge branch 'jt-gitaly-exit-code' into 'master'
gitaly: Exit code 1 on error
Closes #4238
See merge request gitlab-org/gitaly!4821
-rw-r--r-- | cmd/gitaly/main.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/gitaly/main.go b/cmd/gitaly/main.go index 0f04a2b5d..765d729ca 100644 --- a/cmd/gitaly/main.go +++ b/cmd/gitaly/main.go @@ -105,8 +105,13 @@ func main() { if err != nil { log.Fatal(err) } - log.WithError(run(cfg)).Error("shutting down") - log.Info("Gitaly stopped") + + if err := run(cfg); err != nil { + log.WithError(err).Error("Gitaly shutdown") + os.Exit(1) + } + + log.Info("Gitaly shutdown") } func configure(configPath string) (config.Cfg, error) { |