From 59f7ef06d0002e818c73642c963d49f3ccf3d70e Mon Sep 17 00:00:00 2001 From: jessicagreben Date: Sat, 18 Dec 2021 04:44:13 -0800 Subject: [PATCH] update exit code for sd Signed-off-by: jessicagreben --- cmd/promtool/sd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/promtool/sd.go b/cmd/promtool/sd.go index 2950d3e35..90ed4a56c 100644 --- a/cmd/promtool/sd.go +++ b/cmd/promtool/sd.go @@ -74,7 +74,7 @@ func CheckSD(sdConfigFiles, sdJobName string, sdTimeout time.Duration) int { d, err := cfg.NewDiscoverer(discovery.DiscovererOptions{Logger: logger}) if err != nil { fmt.Fprintln(os.Stderr, "Could not create new discoverer", err) - return configErrExitCode + return failureExitCode } go d.Run(ctx, targetGroupChan) } @@ -100,7 +100,7 @@ outerLoop: res, err := json.MarshalIndent(results, "", " ") if err != nil { fmt.Fprintf(os.Stderr, "Could not marshal result json: %s", err) - return configErrExitCode + return failureExitCode } fmt.Printf("%s", res)