@@ -146,7 +146,7 @@ function virtualenvwrapper_derive_workon_home {
146
146
# - Removing extra slashes (e.g., when TMPDIR ends in a slash)
147
147
# - Expanding variables (e.g., $foo)
148
148
# - Converting ~s to complete paths (e.g., ~/ to /home/brian/ and ~arthur to /home/arthur)
149
- workon_home_dir=$( virtualenvwrapper_expandpath " $workon_home_dir " )
149
+ workon_home_dir=" $( virtualenvwrapper_expandpath " $workon_home_dir " ) "
150
150
fi
151
151
152
152
echo " $workon_home_dir "
@@ -297,7 +297,7 @@ function virtualenvwrapper_initialize {
297
297
298
298
# Verify that the passed resource is in path and exists
299
299
function virtualenvwrapper_verify_resource {
300
- typeset exe_path=$( command \w hich " $1 " | (unset GREP_OPTIONS; command \g rep -v " not found" ))
300
+ typeset exe_path=" $( command \w hich " $1 " | (unset GREP_OPTIONS; command \g rep -v " not found" )) "
301
301
if [ " $exe_path " = " " ]
302
302
then
303
303
echo " ERROR: virtualenvwrapper could not find $1 in your path" >&2
@@ -411,11 +411,11 @@ function mkvirtualenv {
411
411
-p|--python)
412
412
i=$(( $i + 1 )) ;
413
413
interpreter=" ${in_args[$i]} " ;
414
- interpreter=$( virtualenvwrapper_absolutepath " $interpreter " ) ;;
414
+ interpreter=" $( virtualenvwrapper_absolutepath " $interpreter " ) " ;;
415
415
-r)
416
416
i=$(( $i + 1 )) ;
417
417
requirements=" ${in_args[$i]} " ;
418
- requirements=$( virtualenvwrapper_expandpath " $requirements " ) ;;
418
+ requirements=" $( virtualenvwrapper_expandpath " $requirements " ) " ;;
419
419
* )
420
420
if [ ${# out_args} -gt 0 ]
421
421
then
@@ -608,7 +608,7 @@ function showvirtualenv {
608
608
echo " showvirtualenv [env]"
609
609
return 1
610
610
fi
611
- env_name=$( basename $VIRTUAL_ENV )
611
+ env_name=$( basename " $VIRTUAL_ENV " )
612
612
fi
613
613
614
614
echo -n " $env_name "
@@ -797,7 +797,7 @@ function add2virtualenv {
797
797
798
798
for pydir in " $@ "
799
799
do
800
- absolute_path=$( virtualenvwrapper_absolutepath " $pydir " )
800
+ absolute_path=" $( virtualenvwrapper_absolutepath " $pydir " ) "
801
801
if [ " $absolute_path " != " $pydir " ]
802
802
then
803
803
echo " Warning: Converting \" $pydir \" to \" $absolute_path \" " 1>&2
@@ -884,13 +884,13 @@ function cpvirtualenv {
884
884
# so its a virtualenv we are importing
885
885
# make sure we have a full path
886
886
# and get the name
887
- src=$( virtualenvwrapper_expandpath " $src_name " )
887
+ src=" $( virtualenvwrapper_expandpath " $src_name " ) "
888
888
# final verification
889
889
if [ ! -e " $src " ]; then
890
890
echo " Please provide a valid virtualenv to copy."
891
891
return 1
892
892
fi
893
- src_name=$( basename " $src " )
893
+ src_name=" $( basename " $src " ) "
894
894
else
895
895
src=" $WORKON_HOME /$src_name "
896
896
fi
@@ -904,7 +904,7 @@ function cpvirtualenv {
904
904
else
905
905
trg=" $WORKON_HOME /$trg_name "
906
906
fi
907
- trg=$( virtualenvwrapper_expandpath " $trg " )
907
+ trg=" $( virtualenvwrapper_expandpath " $trg " ) "
908
908
909
909
# validate trg does not already exist
910
910
# catch copying virtualenv in workon home
@@ -1075,7 +1075,7 @@ function cdproject {
1075
1075
virtualenvwrapper_verify_active_environment || return 1
1076
1076
if [ -f " $VIRTUAL_ENV /$VIRTUALENVWRAPPER_PROJECT_FILENAME " ]
1077
1077
then
1078
- typeset project_dir=$( cat " $VIRTUAL_ENV /$VIRTUALENVWRAPPER_PROJECT_FILENAME " )
1078
+ typeset project_dir=" $( cat " $VIRTUAL_ENV /$VIRTUALENVWRAPPER_PROJECT_FILENAME " ) "
1079
1079
if [ ! -z " $project_dir " ]
1080
1080
then
1081
1081
cd " $project_dir "
0 commit comments