Skip to content

Commit

Permalink
Fix Nomad Exit Code
Browse files Browse the repository at this point in the history
Due to the wrapping of the command, the exit code could not have been retrieved correct anymore.
  • Loading branch information
mpass99 committed Mar 11, 2023
1 parent 6929b69 commit faebac7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/nomad/sentry_debug_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"github.com/getsentry/sentry-go"
"github.com/openHPI/poseidon/pkg/dto"
"io"
"regexp"
"strconv"
Expand All @@ -17,7 +16,7 @@ var (
// Format Parameters: 1. Debug Comment, 2. command.
timeDebugMessageFormatStart = timeDebugMessageFormat + `; %s`
// Format Parameters: 1. command, 2. Debug Comment.
timeDebugMessageFormatEnd = `%s; ` + dto.WrapBashCommand(`ec=$?; `+timeDebugMessageFormat+` && exit $ec`)
timeDebugMessageFormatEnd = `%s; ec=$?; ` + timeDebugMessageFormat + ` && exit $ec`

timeDebugMessagePattern = regexp.MustCompile(
`(?P<before>.*)\x1EPoseidon (?P<text>.+) (?P<time>\d{13})\x1E(?P<after>.*)`)
Expand Down

0 comments on commit faebac7

Please sign in to comment.