File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -140,4 +140,18 @@ as a ``postdeactivate`` hook (`source
140
140
141
141
cd () {
142
142
builtin cd "$@"
143
- }
143
+ }
144
+
145
+ Clean up environments on exit
146
+ =======================================
147
+
148
+ Via `Michael <https://github.com/kojiromike >`__:
149
+
150
+ When you use a temporary virtualenv via ``mktmpenv `` or if you have
151
+ a `deactivate <http://virtualenvwrapper.readthedocs.org/en/latest/plugins.html?highlight=hooks#post-deactivate >`_ hook, you have to actually run
152
+ ``deactivate `` to clean up the temporary environment or run the hook,
153
+ respectively. It's easy to forget and just exit the shell. Put the
154
+ following in ``~/.bash_logout `` (or your shell's equivalent file) to
155
+ always deactivate environments before exiting the shell::
156
+
157
+ [ "$VIRTUAL_ENV" ] && deactivate
You can’t perform that action at this time.
0 commit comments