1
0
mirror of https://github.com/Luzifer/elb-instance-status.git synced 2024-09-16 13:48:34 +00:00

Execute commands using bash -e -o pipefail

This commit is contained in:
Knut Ahlers 2016-08-04 12:17:22 +02:00
parent 337bffcf0c
commit e498f13bbd
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -137,7 +137,7 @@ func executeAndRegisterCheck(ctx context.Context, checkID string) {
check := checks[checkID]
start := time.Now()
cmd := exec.Command("/bin/bash", "-c", check.Command)
cmd := exec.Command("/bin/bash", "-e", "-o", "pipefail", "-c", check.Command)
cmd.Stderr = os.Stderr
if cfg.Verbose {
cmd.Stdout = os.Stdout