1
0
Fork 0
mirror of https://github.com/Luzifer/elb-instance-status.git synced 2024-12-23 03:11:20 +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] check := checks[checkID]
start := time.Now() 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 cmd.Stderr = os.Stderr
if cfg.Verbose { if cfg.Verbose {
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout