Fix Nomad Exit Code
Due to the wrapping of the command, the exit code could not have been retrieved correct anymore.
This commit is contained in:

committed by
Sebastian Serth

parent
7dadc5dfe9
commit
6e069f5d8a
@ -4,7 +4,6 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/getsentry/sentry-go"
|
"github.com/getsentry/sentry-go"
|
||||||
"github.com/openHPI/poseidon/pkg/dto"
|
|
||||||
"io"
|
"io"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -17,7 +16,7 @@ var (
|
|||||||
// Format Parameters: 1. Debug Comment, 2. command.
|
// Format Parameters: 1. Debug Comment, 2. command.
|
||||||
timeDebugMessageFormatStart = timeDebugMessageFormat + `; %s`
|
timeDebugMessageFormatStart = timeDebugMessageFormat + `; %s`
|
||||||
// Format Parameters: 1. command, 2. Debug Comment.
|
// Format Parameters: 1. command, 2. Debug Comment.
|
||||||
timeDebugMessageFormatEnd = `%s; ` + dto.WrapBashCommand(`ec=$?; `+timeDebugMessageFormat+` && exit $ec`)
|
timeDebugMessageFormatEnd = `%s; ec=$?; ` + timeDebugMessageFormat + ` && exit $ec`
|
||||||
|
|
||||||
timeDebugMessagePattern = regexp.MustCompile(
|
timeDebugMessagePattern = regexp.MustCompile(
|
||||||
`(?P<before>.*)\x1EPoseidon (?P<text>.+) (?P<time>\d{13})\x1E(?P<after>.*)`)
|
`(?P<before>.*)\x1EPoseidon (?P<text>.+) (?P<time>\d{13})\x1E(?P<after>.*)`)
|
||||||
|
Reference in New Issue
Block a user