fix: improve accumulation failure message

For accumulation errors when the file load fails due to malformed
YAML and the base load fails due to a timeout, report both errors.
Previously only the malformed YAML error was returned, masking the
git repo timeout.
This commit is contained in:
Ed Overton
2024-02-16 12:10:55 -05:00
parent 91ccf00ac8
commit f80650e8ce
2 changed files with 11 additions and 4 deletions

View File

@@ -15,11 +15,11 @@ type errTimeOut struct {
cmd string
}
func NewErrTimeOut(d time.Duration, c string) errTimeOut {
return errTimeOut{duration: d, cmd: c}
func NewErrTimeOut(d time.Duration, c string) *errTimeOut {
return &errTimeOut{duration: d, cmd: c}
}
func (e errTimeOut) Error() string {
func (e *errTimeOut) Error() string {
return fmt.Sprintf("hit %s timeout running '%s'", e.duration, e.cmd)
}