Skip to content

Commit a4c71f2

Browse files
committed
fix mkvirtualenv -h
1 parent a5edf22 commit a4c71f2

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

docs/source/history.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Dev
2323
named hooks.
2424
- Add support for listing the available hooks, to be used in help
2525
output of commands like virtualenvwrapper.project's mkproject.
26+
- Fix mkvirtualenv -h option behavior.
2627

2728
2.0.2
2829

docs/source/install.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22
Installation
33
============
44

5+
Basic Installation
6+
==================
7+
8+
virtualenvwrapper should be installed using pip_::
9+
10+
$ pip install virtualenvwrapper
11+
12+
You will want to install it into the global Python site-packages area,
13+
along with virtualenv. You may need administrative privileges to do
14+
that.
15+
516
WORKON_HOME
617
===========
718

@@ -10,6 +21,8 @@ your virtual environments. The default is ``$HOME/.virtualenvs``.
1021
This directory must be created before using any virtualenvwrapper
1122
commands.
1223

24+
.. _install-shell-config:
25+
1326
Shell Startup File
1427
==================
1528

@@ -70,3 +83,5 @@ the 2.x series to reflect the fact that shells other than bash are
7083
supported. In your startup file, change ``source
7184
/usr/local/bin/virtualenvwrapper_bashrc`` to ``source
7285
/usr/local/bin/virtualenvwrapper.sh``.
86+
87+
.. _pip: http://pypi.python.org/pypi/pip

virtualenvwrapper.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mkvirtualenv () {
158158
virtualenvwrapper_verify_virtualenv || return 1
159159
(cd "$WORKON_HOME" &&
160160
virtualenv "$@" &&
161-
virtualenvwrapper_run_hook "pre_mkvirtualenv" "$envname"
161+
[ -d "$WORKON_HOME/$envname" ] && virtualenvwrapper_run_hook "pre_mkvirtualenv" "$envname"
162162
)
163163
# If they passed a help option or got an error from virtualenv,
164164
# the environment won't exist. Use that to tell whether

0 commit comments

Comments
 (0)