fix: never let a shell command fail
This makes the terminal go really funkie and sometimes crash when printing the error messages to the current process stdout where nvim is running. Now the error output is sent to the `popen` output and displayed in the ivy completion buffer without messing with the current process io.
This commit is contained in:
parent
ff7c28490d
commit
10a3117aae
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ utils.command_finder = function(command, min)
|
||||||
-- TODO(ade): Think if we want to start escaping the command here. I
|
-- TODO(ade): Think if we want to start escaping the command here. I
|
||||||
-- dont know if its causing issues while trying to use regex especially
|
-- dont know if its causing issues while trying to use regex especially
|
||||||
-- with word boundaries `input:gsub("'", "\\'"):gsub('"', '\\"')`
|
-- with word boundaries `input:gsub("'", "\\'"):gsub('"', '\\"')`
|
||||||
local handle = io.popen(command .. " " .. input .. " 2>&1")
|
local handle = io.popen(command .. " " .. input .. " 2>&1 || true")
|
||||||
if handle == nil then
|
if handle == nil then
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue