Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neovim not updating or upgrading #111

Closed
jonathanmcelroy opened this issue Oct 18, 2014 · 15 comments · Fixed by neovim/neovim#1747
Closed

Neovim not updating or upgrading #111

jonathanmcelroy opened this issue Oct 18, 2014 · 15 comments · Fixed by neovim/neovim#1747
Labels

Comments

@jonathanmcelroy
Copy link

Under normal vim, all the commands work as expected. However, when I execute :PlugUpgrade under neovim without any plug plugins installed, I get the error message:

Error upgrading vim-plug: Vim:E492: Not an editor command: EOF 

When I execute :PlugUpgrade with plugins installed, I get the message:

Error detected while processing function <SNR>2_upgrade:
line   17:
E581: :else without :if:     else

When I run :PlugUpdate, all the plugins that aren't installed are downloaded correctly, but any plugin already install is marked with an 'x' and vim-plug asks me to clean them so it can reinstall them.

@jonathanmcelroy jonathanmcelroy changed the title NeoVim not updating or upgrading Neovim not updating or upgrading Oct 18, 2014
@junegunn
Copy link
Owner

Thanks for the report. I had the same error on PlugUpgrade. So I updated vim-plug to workaround the problem in 4b3fbd1.

But I can't reproduce the PlugUpdate error. Are you running the latest version of Neovim? And do you see errors on PlugStatus?

@jonathanmcelroy
Copy link
Author

I have the version from the arch AUR, which was last packaged about a month ago, so that may be my issue. I'll check with the latest version.

@jonathanmcelroy
Copy link
Author

Using the latest version still gives me the bug. Here is an example of the output:

Updated. Elapsed time: 0.084264 sec.
[xx]

- Finishing ... Done!
x nerdcommenter:
https://git::@github.com/scrooloose/nerdcommenter.git
PlugClean required.
x vim-colors-solarized:
https://git::@github.com/altercation/vim-colors-solarized
PlugClean required.

@junegunn
Copy link
Owner

I see. Do you see any errors in PlugStatus command?
And please show me the relevant section from your .[n]vimrc.
EDIT: I found it here

@junegunn
Copy link
Owner

The above error messages are given when the following command inside git repository gives non-zero exit status.

git rev-parse --abbrev-ref HEAD 2>&1 && git config remote.origin.url

@jonathanmcelroy
Copy link
Author

The commands give me:

jonathan:nerdcommenter/ (master) $ git rev-parse --abbrev-ref HEAD 2>&1 && git config remote.origin.url
master
https://git::@github.com/scrooloose/nerdcommenter.git
jonathan:nerdcommenter/ (master) $ echo $?
0

After debugging a bit, the problem is coming from the s:git_valid function

@junegunn
Copy link
Owner

Thanks. I expected it since it works on normal Vim.

I'm suspecting that system() function of Neovim is giving the invalid result. Please show me the output of the following code in Vim and NVim.

:call system('cd ~/.vim/plugged/nerdcommenter && git rev-parse --abbrev-ref HEAD 2>&1 && git config remote.origin.url') | echo v:shell_error

@jonathanmcelroy
Copy link
Author

The v:shell_error seems to not be set. In one nvim instance, calling :PlugUpdate multiple times always gives a v:shell_error of -888693480. Opening another nvim results in 425680152. This may be an issue with neovim not setting v:shell_error after issuing a shell command.

@junegunn
Copy link
Owner

Ah, thanks for the confirmation.

/to @tarruda and @justinmk
Hey guys, do you have any idea on this?
v:shell_error is not correctly set after system() call.

@jonathanmcelroy
Copy link
Author

Occationally, the exit code will be 0, but most of the time it seems to be the undefined value.

@junegunn
Copy link
Owner

It clearly looks like an issue with Neovim. Until the issue is resolved, you can change line 889 to if 1 to ignore the error.

@justinmk
Copy link
Contributor

Thanks for reporting. For reference: neovim/neovim#1303

Also @junegunn thanks for working around the ruby << EOF issue even though it's clearly a Neovim bug ( neovim/neovim#1308 ).

@junegunn
Copy link
Owner

junegunn commented Nov 8, 2014

@jonathanmcelroy Can we close this?

@jonathanmcelroy
Copy link
Author

I think with the many changes to Neovim since, the bug has disappeared. Closing

justinmk added a commit to justinmk/neovim that referenced this issue Dec 27, 2014
- restores behavior equivalent to Vim compiled without FEAT_MZSCHEME, etc.
  (avoids spurious "E492: Not an editor command: EOF") for code such as:
```vim
  if 0
    perl << EOF
  end
  EOF
  endif
```
  see :help script-here
- fixes neovim#1308
- fixes junegunn/vim-plug#111
@justinmk
Copy link
Contributor

FYI, the problem worked around in 4b3fbd1 is now fixed in Neovim.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants