kristijanhusak / vim-packager

Vim plugin manager that utilizes "jobs" and "pack" features.
MIT License
245 stars 9 forks source link

Error exit status 1 and plugins are actually installed. #29

Closed jdhao closed 3 years ago

jdhao commented 3 years ago

Hi, this is good plugin with nice UI. I tried this plugin on my Linux server. When I run :call packager#update(), I am seeing Error (exit status 1) for every plugin I try to install. The full error is (using E):

usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--reference <re
pository>] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]                                                                   

I suppose this is somehow related to git command, but I am not sure how to fix it. My git version (git --version): 2.7.4.

My minimal failing config:

packadd vim-packager
let site_path = stdpath('data') . '/site/pack/my_plugins'
call packager#init({'dir': site_path, 'jobs': 16})
call packager#add('prabirshrestha/vim-lsp')

Start with nvim -u minimal.vim and then :call packager#update(), and then I see the error message.

kristijanhusak commented 3 years ago

I'm not able to reproduce it. My version of git is 2.28.0 though. Are you able to give it a try with the newer version of git? Also, what do you get for :echo &shell ? I'm assuming you use Neovim because of stdpath function.

jdhao commented 3 years ago

The system is managed by root. I can not install a newer version of git. echo &shell shows /bin/bash.

Yeah, I am using neovim. I tried the above config on my Mac with git version 2.21.0. It works without any errors. I suppose a new option is used by git which can not be recognized by older git?

kristijanhusak commented 3 years ago

Yeah, maybe it's the git issue, i need to verify. Can you try using different dir, or leave the default one and see if it works? Maybe your path is write protected.

jdhao commented 3 years ago

I do not think so, since the plugins are installed successfully and the directory is under my HOME. It is not the permission issue.

What is the Git command used to download/clone the repositories to the specified location? I can manually try it on the command line to see if I can reproduce it.

kristijanhusak commented 3 years ago

Can you try to go into vim-lsp folder and try these commands:

  1. git submodule update --init --recursive --progress
  2. git submodule update --init --recursive

My assumption is that --progress is not supported in older versions, but I can't verify it at this moment.

jdhao commented 3 years ago

Sorry, I am on my computer right now. Will report it tomorrow.

jdhao commented 3 years ago

I have tried the above two commands. The first one will error out. It seems that --progress is not supported in Git 2.7.4.

From post here, the --progress option was introduced in Git version 2.11.0.

kristijanhusak commented 3 years ago

Pull the latest version and give it a try. I introduced check for git version and including progres only if version is > 2.11.0.

jdhao commented 3 years ago

Thanks, it now works without the above error messages.