From 578b0f747d8cf773c0e5ba9394bcf8436d6b0a01 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 25 May 2026 21:26:31 +0300 Subject: fix(prefixed_output): add flush to prevent losing final unterminated line PrefixedOutput#print buffers partial lines until a newline is received. When the last chunk from a stream does not end with \n (common with Open3 popen2e EOF), that chunk was discarded. Add #flush to emit the remaining buffer with the prefix, and call it at the end of all streaming loops in SshRunner and WireGuardSetup. --- lib/hyperstack/wireguard_setup.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/hyperstack/wireguard_setup.rb') diff --git a/lib/hyperstack/wireguard_setup.rb b/lib/hyperstack/wireguard_setup.rb index 82a9dba..b2b7ec1 100644 --- a/lib/hyperstack/wireguard_setup.rb +++ b/lib/hyperstack/wireguard_setup.rb @@ -68,6 +68,7 @@ module HyperstackVM stdin.puts stdin.close output.each { |line| @out.print(line) } + @out.flush wait_thr.value end end -- cgit v1.2.3