mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2025-12-06 06:46:10 +00:00
feat(jobs): emit job errors
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local async_job = require "telescope._"
|
||||
local LinesPipe = require("telescope._").LinesPipe
|
||||
local ErrorPipe = require("telescope._").ErrorPipe
|
||||
|
||||
local make_entry = require "telescope.make_entry"
|
||||
local log = require "telescope.log"
|
||||
@@ -46,6 +47,7 @@ return function(opts)
|
||||
end
|
||||
|
||||
local stdout = LinesPipe()
|
||||
local stderr = ErrorPipe()
|
||||
|
||||
job = async_job.spawn {
|
||||
command = job_opts.command,
|
||||
@@ -55,8 +57,11 @@ return function(opts)
|
||||
writer = writer,
|
||||
|
||||
stdout = stdout,
|
||||
stderr = stderr,
|
||||
}
|
||||
|
||||
stderr:start()
|
||||
|
||||
local line_num = 0
|
||||
for line in stdout:iter(true) do
|
||||
line_num = line_num + 1
|
||||
|
||||
Reference in New Issue
Block a user