mirror of
https://github.com/nvim-telescope/telescope.nvim
synced 2024-09-16 21:24:02 +02:00
feat(jobs): emit job errors
This commit is contained in:
parent
2d92125620
commit
e911397953
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue