From e196180a0dec49549565850239831d4420464623 Mon Sep 17 00:00:00 2001 From: Codey Oxley Date: Tue, 8 May 2018 21:08:25 -0700 Subject: [PATCH] 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`. --- plugin/black.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') -- 2.39.2