-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prevent errors when using secure connections #19
Conversation
51e108b
to
19ebbd8
Compare
end, tbl) | ||
end | ||
|
||
local function handle_error(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Job
's on_stderr
can surface errors from the coroutine as the first argument
https://github.com/nvim-lua/plenary.nvim/blob/2d9b06177a975543726ce5c73fca176cedbffe9d/lua/plenary/job.lua#L333
end | ||
end | ||
|
||
local function handle_job_error(job) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The job will report a summary of errors
https://github.com/nvim-lua/plenary.nvim/blob/2d9b06177a975543726ce5c73fca176cedbffe9d/lua/plenary/job.lua#L616-L622
I am seeing the same error on MacOS Sequoia, curl 8.9.1. Made some local changes to get it to work. Hoping to see this get merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use Jenkins anymore, so it's quite hard to test this. This looks good, so I'll just go ahead and say LGTM. Thanks!
With my version of curl (
v8.7.1
), if I use a secure jenkins host I get the following error from the job.This isn't surfaced very well as it the code errors when trying to decode the empty response
nvim-jenkinsfile-linter/lua/jenkinsfile_linter.lua
Line 33 in b6b48b0
Job reports the error when logged:
This looks to be coming from the
insecure
parameter which defaults to an empty string when not set via the environment.This PR should fix this scenario and report job failures more consistently