-
-
Notifications
You must be signed in to change notification settings - Fork 422
Suppress activate/deactivate messages by default #169
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
Conversation
I've forgot adding appropriate tests. Please wait a little ... |
@@ -138,7 +138,9 @@ fi | |||
|
|||
pyenv-sh-deactivate --force --quiet ${VERBOSE+--verbose} || true | |||
|
|||
echo "pyenv-virtualenv: activate ${venv}" 1>&2 | |||
if [ -n "$PYENV_VIRTUALENV_VERBOSE_ACTIVATE" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do you think how we should manage existing ${VERBOSE}
here? In my guts feeling, this line should care about both ${VERBOSE}
and ${PYENV_VIRTUALENV_VERBOSE_ACTIVATE}
too....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like if [ -n "$PYENV_VIRTUALENV_VERBOSE_ACTIVATE" -a -n "$VERBOSE" ]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VERBOSE seems to be used with the called tools only currently?! (python/pip)
I assume the main this about this PR is to change this after all?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically the ${VERBOSE}
is used mainly from internally. I think just checking ${PYENV_VIRTUALENV_VERBOSE_ACTIVATE}
here could be sufficient at least for now.
CI's still failing. I'll try to look into this once I get a chance.... |
Sorry for being late but bats' test drives me crazy. I've edited test codes but it doesn't work as I expected (bats says that expected output and actual output are different, but they look same for me.) I'll push (still not working) additional commits later. |
This is used by `pyenv activate` and is unnecessarily noisy (and confusing). This seems to be sensible regardless of having an "activate" message with or without `--verbose` (see pyenv#169).
Yes! It's passing now. |
LGTM (from the behavior). |
@@ -32,7 +32,6 @@ setup() { | |||
assert_success | |||
assert_output <<EOS | |||
deactivated | |||
pyenv-virtualenv: activate anaconda-2.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add unset PYENV_VIRTUALENV_VERBOSE_ACTIVATE
in the setup
of this file.
Oh I've forgot to tell that I've pushed commits. |
This PR includes changes that suppress message on virtualenv activation and de-activation.
Detailed info is here: #168
What I did
Added
if
statement around echoes inbin/pyenv-sh-activate
andbin/pyenv-sh-deactivate
. If users want pyenv to show verbose activate/deactivate message, they have to configureexport PYENV_VIRTUALENV_DISABLE_PROMPT=1
.