summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/io/fs/readfile.go2
-rw-r--r--internal/server/handlers/readcommand.go5
2 files changed, 4 insertions, 3 deletions
diff --git a/internal/io/fs/readfile.go b/internal/io/fs/readfile.go
index 9c2f53c..18c20c0 100644
--- a/internal/io/fs/readfile.go
+++ b/internal/io/fs/readfile.go
@@ -99,7 +99,7 @@ func (f readFile) Start(ctx context.Context, ltx lcontext.LContext,
}
func (f readFile) makeReader() (*bufio.Reader, *os.File, error) {
- if f.filePath == "PIPE" && f.globID == "PIPE" {
+ if f.filePath == "" && f.globID == "-" {
return f.makePipeReader()
}
return f.makeFileReader()
diff --git a/internal/server/handlers/readcommand.go b/internal/server/handlers/readcommand.go
index bd536de..6d1b55a 100644
--- a/internal/server/handlers/readcommand.go
+++ b/internal/server/handlers/readcommand.go
@@ -50,8 +50,9 @@ 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() {
- dlog.Server.Debug("Reading data from pipe")
- r.read(ctx, ltx, "PIPE", "PIPE", re)
+ dlog.Server.Debug("Reading data from stdin pipe")
+ // Empty file path and globID "-" represents reading from the stdin pipe.
+ r.read(ctx, ltx, "", "-", re)
return
}