From 01d0f8b3664cdff85d463fb05c8a4dfb32bda3a4 Mon Sep 17 00:00:00 2001 From: Marc Gurevitx Date: Wed, 10 Jul 2024 15:49:56 +0300 Subject: [PATCH] Fix for #155 --- MiniScript-cpp/src/ShellIntrinsics.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/MiniScript-cpp/src/ShellIntrinsics.cpp b/MiniScript-cpp/src/ShellIntrinsics.cpp index 1225a10..e54718a 100644 --- a/MiniScript-cpp/src/ShellIntrinsics.cpp +++ b/MiniScript-cpp/src/ShellIntrinsics.cpp @@ -735,6 +735,7 @@ static IntrinsicResult intrinsic_readLines(Context *context, IntrinsicResult par partialLine = String(&buf[lineStart], bytesRead - lineStart); } } + if (!partialLine.empty()) list.Add(partialLine); fclose(handle); return IntrinsicResult(list); }