Skip to content

Commit 5cdf8ca

Browse files
committed
fix for issue #5
1 parent 6521e8e commit 5cdf8ca

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

README

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ For more details, refer to the column published in the May 2008 issue of Python
130130
Updates
131131
=======
132132

133+
1.13
134+
- Fix issue #5 by correctly handling symlinks and limiting the list of envs to things
135+
that look like they can be activated.
136+
133137
1.12
134138
- Check return value of virtualenvwrapper_verify_workon_home everywhere, thanks to
135139
Jeff Forcier for pointing out the errors.

pavement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# What project are we building?
2424
PROJECT = 'virtualenvwrapper'
25-
VERSION = '1.12'
25+
VERSION = '1.13'
2626

2727
# Read the long description to give to setup
2828
README_FILE = 'README'

test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,17 @@ virtualenvwrapper_verify_active_environment && echo "FAIL" || echo "PASS"
6363

6464
echo
6565
echo "LISTING ENVIRONMENTS"
66+
mkdir -p "$WORKON_HOME/extra/bin"
67+
touch "$WORKON_HOME/extra/bin/activate"
68+
(cd "$WORKON_HOME"; ln -s extra link)
6669
envs=`workon | tr '\n' ' '`
6770
echo "Found environments: $envs"
68-
if [ "$envs" = "env1 env2 " ]
71+
if [ "$envs" = "env1 env2 extra link " ]
6972
then
7073
echo "PASS"
7174
else
7275
echo "FAIL: \""$envs\"""
76+
ls -l "$WORKON_HOME"
7377
fi
7478

7579
echo

virtualenvwrapper_bashrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function rmvirtualenv () {
115115
# List the available environments.
116116
function virtualenvwrapper_show_workon_options () {
117117
virtualenvwrapper_verify_workon_home || return 1
118-
find "$WORKON_HOME" -maxdepth 1 -mindepth 1 -type d -exec basename '{}' \; | sort
118+
(cd "$WORKON_HOME"; ls */bin/activate) | sed 's|/bin/activate||' | sort
119119
}
120120

121121
# List or change working virtual environments

0 commit comments

Comments
 (0)