pyenv-win / pyenv-win-venv

A CLI to manage virtual envs with pyenv-win
Apache License 2.0
78 stars 8 forks source link

Git stderr output is not suppressed when updating #3

Closed cderv closed 1 year ago

cderv commented 1 year ago
> pyenv-venv update self
fatal: not a git repository (or any of the parent directories): .git
pyenv-win-venv 0.5.0 installed.
New version available: 0.5.2. Updating...
Backing up existing envs to C:\Users\chris\AppData\Local\Temp\pyenv-win-venv-backup-mYyCoTHSLs
Removing C:\Users\chris\.pyenv-win-venv
Restoring Python installations
pyenv-win-venv is successfully installed. You may need to close and reopen your terminal before using it.

See first line of results.

I believe this is because Out-Null in powershell only suppresses the stdout, not the stderr. Using complete redirection should be the solution here. Very instructive thread in SO about that.

I'll send a PR.

arzkar commented 1 year ago

Yea, I noticed that as well. It was in my backlog but hadn't had the time to fix it. Thanks for the PR.