From 752d8b2a12848b6a03dc415723eba4d8f789a0a5 Mon Sep 17 00:00:00 2001 From: Ryan Shatford Date: Mon, 1 Jun 2026 07:35:08 -0700 Subject: [PATCH] Ensure AwaitFirstByte is called for all stream inputs to protect interactive prompts --- cmd/moor/moor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/moor/moor.go b/cmd/moor/moor.go index d1daab94..8c16b4d1 100644 --- a/cmd/moor/moor.go +++ b/cmd/moor/moor.go @@ -587,7 +587,7 @@ func pagerFromArgs( var readerImpl *reader.ReaderImpl var err error - if stdinIsRedirected && inputFilename == "-" { + if inputFilename == "-" { if stdinDone { // stdin already drained, don't do it again continue @@ -600,6 +600,8 @@ func pagerFromArgs( // If the user is doing "sudo something | moor" we can't show the UI until // we start getting data, otherwise we'll mess up sudo's password prompt. + // + // This also protects the shell prompt if we're doing "moor -". readerImpl.AwaitFirstByte() stdinDone = true