perf(installer): use a shallow clone of lunarvim (#4197)

* perf(`utils/installer`): speed up lvim installation

* feat(`utils/installer`): show progress during repo cloning

* fest: longer timeout

---------

Co-authored-by: LostNeophyte <lostneophyte@tuta.io>
This commit is contained in:
uid54289 2023-05-23 20:07:44 +00:00 committed by GitHub
parent ef3f25fd1d
commit 3dce3d86d4
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ local function git_cmd(opts)
on_stderr = function(_, data) on_stderr = function(_, data)
table.insert(stderr, data) table.insert(stderr, data)
end, end,
}):sync() }):sync(10000)
if not vim.tbl_isempty(stderr) then if not vim.tbl_isempty(stderr) then
Log:debug(stderr) Log:debug(stderr)

View file

@ -392,7 +392,7 @@ function verify_lvim_dirs() {
function clone_lvim() { function clone_lvim() {
msg "Cloning LunarVim configuration" msg "Cloning LunarVim configuration"
if ! git clone --branch "$LV_BRANCH" \ if ! git clone --progress --depth 1 --branch "$LV_BRANCH" \
"https://github.com/${LV_REMOTE}" "$LUNARVIM_BASE_DIR"; then "https://github.com/${LV_REMOTE}" "$LUNARVIM_BASE_DIR"; then
echo "Failed to clone repository. Installation failed." echo "Failed to clone repository. Installation failed."
exit 1 exit 1