From 7303bb29905c6141a1b5893ba391af5a2a43cd78 Mon Sep 17 00:00:00 2001 From: siduck Date: Sun, 8 Jan 2023 07:51:37 +0530 Subject: [PATCH] avoid using vim.cmd! for running os commands --- lua/core/bootstrap.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/core/bootstrap.lua b/lua/core/bootstrap.lua index f4a026e..fac437e 100644 --- a/lua/core/bootstrap.lua +++ b/lua/core/bootstrap.lua @@ -4,10 +4,9 @@ M.lazy = function(install_path) print "Downloading lazy-lock.json file..." local config_branch = require("core.utils").load_config().options.nvChad.update_branch + local lazy_local_url = "https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json " - vim.cmd( - "!curl -o lazy-lock.json https://raw.githubusercontent.com/NvChad/extensions/lazy-lock/" .. config_branch .. ".json " - ) + vim.fn.system { "curl", "-o", "lazy-lock.json", lazy_local_url } print "Bootstrapping lazy.nvim .."