Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions shellbot/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@ return {
local shellbot = vim.env['SHELLBOT']
if shellbot == nil then
health.warn('SHELLBOT environment variable is not set')
elseif vim.fn.executable(shellbot) ~= 1 then
health.warn('SHELLBOT (' .. vim.inspect(shellbot) .. ') is not executable')
else
health.ok('SHELLBOT environment variable is set to an executable')
local executable = vim.fn.split(shellbot, ' ')[1]
if executable == nil then
health.warn('SHELLBOT environment variable is empty')
elseif vim.fn.executable(executable) ~= 1 then
health.warn('SHELLBOT (' .. vim.inspect(shellbot) .. ') is not executable')
else
health.ok('SHELLBOT environment variable is set to an executable')
end
end
end,
}