aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-05-18 18:57:56 +0200
committerWilliam Boman <william@redwill.se>2021-05-18 18:58:03 +0200
commit0b0199fbe58f5d50af0c588cfeaab16cfab46a1c (patch)
tree00128c74f7b0702bb133739ca0da2362f91ad2be /lua/nvim-lsp-installer
parentinstallers/shell: add opts arg (diff)
downloadmason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.tar
mason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.tar.gz
mason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.tar.bz2
mason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.tar.lz
mason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.tar.xz
mason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.tar.zst
mason-0b0199fbe58f5d50af0c588cfeaab16cfab46a1c.zip
installers/zx: add missing early returns
Diffstat (limited to 'lua/nvim-lsp-installer')
-rw-r--r--lua/nvim-lsp-installer/installers/zx.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/installers/zx.lua b/lua/nvim-lsp-installer/installers/zx.lua
index 04f8148a..44b0a718 100644
--- a/lua/nvim-lsp-installer/installers/zx.lua
+++ b/lua/nvim-lsp-installer/installers/zx.lua
@@ -23,6 +23,7 @@ local function zx_installer(force)
if vim.fn.executable("npm") ~= 1 or vim.fn.executable("node") ~= 1 then
callback(false, "Cannot install zx because npm and/or node not installed.")
+ return
end
local is_zx_already_installed = fs.file_exists(ZX_EXECUTABLE)
@@ -41,6 +42,7 @@ local function zx_installer(force)
vim.schedule_wrap(function (code)
if code ~= 0 then
callback(false, "Failed to install zx.")
+ return
end
has_installed_zx = true
vim.cmd [[ echon "" ]] -- clear the previously printed feedback message… ¯\_(ツ)_/¯