Skip to content

posh v1.3.59

Latest

Choose a tag to compare

@fermat-tech fermat-tech released this 17 Jul 00:07

Test-suite maintenance release. No changes to the shell itself — these binaries behave identically to v1.3.59's predecessor, v1.3.58.

Fixed

  • Fixed the internal/eval test helpers silently losing output when a pipeline stage ran an external command.

    The helpers gave the same bytes.Buffer to both Shell.Stdout and Shell.Stderr. Go's exec drains an external child's stderr with io.Copy, which prefers an io.ReaderFrom; bytes.Buffer.ReadFrom records the buffer length on entry, blocks until the child's stderr reaches EOF, then truncates back to that length plus the bytes it read. A child writing no stderr reads zero, so the final re-slice discarded whatever a concurrent stage had appended.

    This made TestReadHeredocPipeline fail against correct shell behaviour: cat << EOF | while read line; do echo "$line"; done returned an empty string under go test, while posh itself has always run it correctly. The shell binary passes real *os.File streams, which exec inherits directly and never copies, so no released build was ever affected.