From 76276a816b16c4ab5796ce5666113729a7116797 Mon Sep 17 00:00:00 2001 From: Ethan Zimbelman Date: Sat, 3 Feb 2024 22:36:37 +0000 Subject: [PATCH] fix: capture timing information for erroneous commands (#82) --- CHANGELOG.md | 1 + pkg/times/stopwatch.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb9af5f..314d4e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Output outputs in an unbuffered manner as output happens +- Capture timing information for erroneous commands ### Maintenance diff --git a/pkg/times/stopwatch.go b/pkg/times/stopwatch.go index 14bafb9..1c2d24b 100644 --- a/pkg/times/stopwatch.go +++ b/pkg/times/stopwatch.go @@ -36,7 +36,7 @@ func (bw *bufferWriter) Write(p []byte) (int, error) { func timerCommand(command []string, stderr bufferWriter) *exec.Cmd { timeShell := []string{ strings.Join(command, " "), - "&&", + ";", "1>&2", "echo", stderr.bounds,