diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-16 00:39:31 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-16 00:39:31 +0300 |
| commit | 89943598a0b3c55d268e7dd51bd4199723a20c9d (patch) | |
| tree | 99ddf997f333c3068a1ae0a8da334abe4ed34948 /internal/server | |
| parent | 0e63fe222d52c8ce01b648be67cf8f0688140679 (diff) | |
initial faster readfile
Diffstat (limited to 'internal/server')
| -rw-r--r-- | internal/server/handlers/readcommand.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/server/handlers/readcommand.go b/internal/server/handlers/readcommand.go index 44ba9e4..5f7da86 100644 --- a/internal/server/handlers/readcommand.go +++ b/internal/server/handlers/readcommand.go @@ -49,7 +49,8 @@ func (r *readCommand) Start(ctx context.Context, ltx lcontext.LContext, // In serverless mode, can also read data from pipe // e.g.: grep foo bar.log | dmap 'from STATS select ...' - if r.isInputFromPipe() { + // Only read from stdin if no file is specified AND input is from pipe + if (args[1] == "" || args[1] == "-") && r.isInputFromPipe() { dlog.Server.Debug("Reading data from stdin pipe") // Empty file path and globID "-" represents reading from the stdin pipe. r.read(ctx, ltx, "", "-", re) |
