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`.
This commit is contained in:
Codey Oxley 2018-05-08 21:08:25 -07:00 committed by Łukasz Langa
parent 987543001a
commit e196180a0d

View File

@ -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')