File tree Expand file tree Collapse file tree 3 files changed +46
-3
lines changed
Expand file tree Collapse file tree 3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Release History
55dev
66===
77
8- - Ensure that all $() style commands that produce paths are
8+ - Ensure that all `` $() `` style commands that produce paths are
99 quoted. Addresses :bbissue: `164 `.
1010- Add :ref: `command-wipeenv ` command for removing all packages
1111 installed in the virtualenv.
1717 :ref: `command-mkvirtualenv `. Resolves :bbissue: `190 `.
1818- Add :ref: `command-allvirtualenv ` command to run a command across all
1919 virtualenvs. Suggested by Dave Coutts in :bbissue: `186 `.
20+ - Fix :ref: `command-lsvirtualenv ` when there are spaces in
21+ ``WORKON_HOME ``. Resolves :bbissue: `194 `.
2022
21234.0
2224===
Original file line number Diff line number Diff line change 1+ # -*- mode: shell-script -*-
2+
3+ test_dir=$( cd $( dirname $0 ) && pwd)
4+ source " $test_dir /setup.sh"
5+
6+ oneTimeSetUp () {
7+ rm -rf " $WORKON_HOME "
8+ mkdir -p " $WORKON_HOME "
9+ source " $test_dir /../virtualenvwrapper.sh"
10+ }
11+
12+ oneTimeTearDown () {
13+ rm -rf " $WORKON_HOME "
14+ }
15+
16+ setUp () {
17+ echo
18+ rm -f " $test_dir /catch_output"
19+ }
20+
21+ test_no_workon_home () {
22+ old_home=" $WORKON_HOME "
23+ export WORKON_HOME=" $WORKON_HOME /not_there"
24+ lsvirtualenv > " $old_home /output" 2>&1
25+ output=$( cat " $old_home /output" )
26+ assertTrue " Did not see expected message" " echo $output | grep 'does not exist'"
27+ WORKON_HOME=" $old_home "
28+ }
29+
30+ test_space_in_workon_home () {
31+ old_home=" $WORKON_HOME "
32+ export WORKON_HOME=" $WORKON_HOME /with space"
33+ mkdir " $WORKON_HOME "
34+ (cd " $WORKON_HOME " ; virtualenv testenv) 2>&1
35+ lsvirtualenv -b > " $old_home /output"
36+ output=$( cat " $old_home /output" )
37+ assertTrue " Did not see expected message in \" $output \" " " echo $output | grep 'testenv'"
38+ WORKON_HOME=" $old_home "
39+ }
40+
41+
42+ . " $test_dir /shunit2"
Original file line number Diff line number Diff line change @@ -534,8 +534,7 @@ function virtualenvwrapper_show_workon_options {
534534 # 4. Format the output to show one name on a line.
535535 # 5. Eliminate any lines with * on them because that means there
536536 # were no envs.
537- (echo $WORKON_HOME /* /$VIRTUALENVWRAPPER_ENV_BIN_DIR /activate) 2> /dev/null \
538- | command \s ed " s|$WORKON_HOME /||g" \
537+ (cd " $WORKON_HOME " && echo * /$VIRTUALENVWRAPPER_ENV_BIN_DIR /activate) 2> /dev/null \
539538 | command \s ed " s|/$VIRTUALENVWRAPPER_ENV_BIN_DIR /activate||g" \
540539 | command \f mt -w 1 \
541540 | (unset GREP_OPTIONS; command \e grep -v ' ^\*$' ) 2> /dev/null
You can’t perform that action at this time.
0 commit comments