From 6fb1a0be79cd39a7170af832d410d98ee8f37ac5 Mon Sep 17 00:00:00 2001 From: Bernd Ahlers Date: Tue, 11 Jun 2024 11:38:04 +0200 Subject: [PATCH] Don't exit with an error on runner exit code 130 --- runner/scripts.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runner/scripts.go b/runner/scripts.go index f29ebec..fbcc0d1 100644 --- a/runner/scripts.go +++ b/runner/scripts.go @@ -25,6 +25,11 @@ func execRunnerScript(config Config, env []string) error { go monitorCommandExecSignals() if err := command.Run(); err != nil { + // Docker Compose exits with 130 when ctrl-c is pressed to stop the services. + // Other signal related error codes are 128 + signal number. (130 SIGINT/2, 137 SIGKILL/9, 143 SIGTERM/15) + if command.ProcessState.ExitCode() == 130 { + return nil + } return errors.Wrapf(err, "couldn't run script %s", strings.Join(command.Args, " ")) }