From 3d5766ac33ac98a9fbb669696f724d9840e8cdc8 Mon Sep 17 00:00:00 2001 From: James Dugan <43224155+jdugan6240@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:06:21 -0600 Subject: [PATCH] fix: hilbish.sink.readAll() function now reads data that doesn't end in a newline (#345) --- CHANGELOG.md | 1 + util/sink.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 011fce6..c07d540 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixed - Skip over file and prevent panic if info cannot be retrieved during file completion (due to permission error or anything else) - Apply environment variables properly after 2.3 shell interpreter changes +- hilbish.sink.readAll() function now reads data that doesn't end in a newline ## [2.3.3] - 2024-11-04 ### Fixed diff --git a/util/sink.go b/util/sink.go index 8d1167e..c433494 100644 --- a/util/sink.go +++ b/util/sink.go @@ -99,6 +99,8 @@ func luaSinkReadAll(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) { line, err := s.Rw.ReadString('\n') if err != nil { if err == io.EOF { + // We still want to add the data we read + lines = append(lines, line) break }