From: Codey Oxley Date: Wed, 9 May 2018 04:08:25 +0000 (-0700) Subject: Addresses #174 Neovim Error (#197) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/e196180a0dec49549565850239831d4420464623?ds=sidebyside Addresses #174 Neovim Error (#197) Neovim uses stdout for `msgpack` communication and the `subprocess` call for `virtualenv` was leaking that stream. Fix is to attach to a `subprocess.PIPE`. --- diff --git a/plugin/black.vim b/plugin/black.vim index 9cf5f2d..c5c663c 100644 --- a/plugin/black.vim +++ b/plugin/black.vim @@ -78,7 +78,7 @@ def _initialize_black_env(upgrade=False): if upgrade: print('Upgrading Black with pip...') if first_install or upgrade: - subprocess.run([str(_get_pip(virtualenv_path)), 'install', '-U', 'black']) + subprocess.run([str(_get_pip(virtualenv_path)), 'install', '-U', 'black'], stdout=subprocess.PIPE) print('DONE! You are all set, thanks for waiting ✨ 🍰 ✨') if first_install: print('Pro-tip: to upgrade Black in the future, use the :BlackUpgrade command and restart Vim.\n')