mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
Avoid printing an error response when detecting xclip.
While we're at, using the slightly more portable `command -v` technique to detect the executable. Also, there's no need to use `io.popen()` if we aren't going to record the path. Instead, let's use the simpler `os.execute()` to detect the presence of xclip.
This commit is contained in:
@@ -24,9 +24,7 @@ end
|
|||||||
local xclip = nil
|
local xclip = nil
|
||||||
do
|
do
|
||||||
if os.getenv('DISPLAY') then
|
if os.getenv('DISPLAY') then
|
||||||
local proc = io.popen('which xclip')
|
xclip = (os.execute('command -v xclip > /dev/null 2>&1') == 0)
|
||||||
xclip = proc:read()
|
|
||||||
proc:close()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user