Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/moor/moor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading