Skip to content

Commit

Permalink
updater: run MasonUpdate cmd only if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
siduck committed Sep 7, 2023
1 parent d48414f commit 5344b81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/nvchad/updater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ return function()

vim.fn.jobstart({ "git", "pull" }, { silent = true, cwd = nvim_config })
require("lazy").sync()
require("lazy").load({ plugins = { "mason.nvim" } })
vim.cmd("MasonUpdate")

if vim.fn.exists(':MasonUpdate') then
vim.cmd "MasonUpdate"
end
end)
end

Expand Down

1 comment on commit 5344b81

@siduck
Copy link
Member Author

@siduck siduck commented on 5344b81 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a check for it because if mason is removed by the user then this command shouldnt run

shoutout to @martin-braun

Please sign in to comment.