fix(eslint): openDoc breaks on some URLs #3615
Some checks failed
docgen / docgen (push) Has been cancelled

This commit is contained in:
Kushal-Chandar 2025-02-14 21:59:26 +05:30 committed by GitHub
parent 31226f6736
commit 7af2c37192
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -131,16 +131,8 @@ return {
end,
handlers = {
['eslint/openDoc'] = function(_, result)
if not result then
return
end
local sysname = vim.loop.os_uname().sysname
if sysname:match 'Windows' then
os.execute(string.format('start %q', result.url))
elseif sysname:match 'Linux' then
os.execute(string.format('xdg-open %q', result.url))
else
os.execute(string.format('open %q', result.url))
if result then
vim.ui.open(result.url)
end
return {}
end,