From 4b03fa31008e43390772ab20eeca254d3d6dc553 Mon Sep 17 00:00:00 2001 From: jessicagreben Date: Thu, 30 Dec 2021 05:37:57 -0800 Subject: [PATCH] replace config exit code with failure exit code Signed-off-by: jessicagreben --- cmd/promtool/main.go | 5 ++--- cmd/promtool/sd.go | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/promtool/main.go b/cmd/promtool/main.go index 5c85de54f..698594820 100644 --- a/cmd/promtool/main.go +++ b/cmd/promtool/main.go @@ -57,9 +57,8 @@ import ( ) const ( - successExitCode = 0 - failureExitCode = 1 - configErrExitCode = 2 + successExitCode = 0 + failureExitCode = 1 // Exit code 3 is used for "one or more lint issues detected". lintErrExitCode = 3 ) diff --git a/cmd/promtool/sd.go b/cmd/promtool/sd.go index 90ed4a56c..ce2bb3de5 100644 --- a/cmd/promtool/sd.go +++ b/cmd/promtool/sd.go @@ -43,7 +43,7 @@ func CheckSD(sdConfigFiles, sdJobName string, sdTimeout time.Duration) int { cfg, err := config.LoadFile(sdConfigFiles, false, false, logger) if err != nil { fmt.Fprintln(os.Stderr, "Cannot load config", err) - return configErrExitCode + return failureExitCode } var scrapeConfig *config.ScrapeConfig