Skip to content

Commit

Permalink
fix: add fallback for kitty during checkhealth (#139)
Browse files Browse the repository at this point in the history
closes #138
  • Loading branch information
mikesmithgh authored Jan 2, 2024
1 parent 151bc36 commit a29f917
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/kitty-scrollback/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ end
local function check_kitty_remote_control()
vim.health.start('kitty-scrollback: Kitty remote control')
local cmd = {
p.kitty_data.kitty_path,
-- fallback to 'kitty' because checkhealth can be called outside of standard setup flow
(p and p.kitty_data and p.kitty_data.kitty_path) and p.kitty_data.kitty_path or 'kitty',
'@',
'ls',
}
Expand Down Expand Up @@ -70,7 +71,7 @@ local function check_has_kitty_data()
.. kitty_scrollback_kitten
.. ' --config ksb_builtin_checkhealth`'
vim.health.warn('No Kitty data available unable to perform a complete healthcheck', {
'Add the config options `checkhealth = true` to your *config* or execute the command `:KittyScrollbackCheckHealth` '
'Execute the command `:KittyScrollbackCheckHealth` or add the config options `checkhealth = true` to your *config* '
.. 'to run `checkhealth` within the context of a Kitten',
checkhealth_command,
})
Expand Down

0 comments on commit a29f917

Please sign in to comment.