5959
6060# If the path is relative, prefix it with $HOME
6161# (note: for compatibility)
62- if echo " $WORKON_HOME " | grep -e ' ^[^/~]'
62+ if echo " $WORKON_HOME " | grep -e ' ^[^/~]' > /dev/null
6363then
6464 export WORKON_HOME=" $HOME /$WORKON_HOME "
6565fi
6868# path might contain stuff to expand.
6969# (it might be possible to do this in shell, but I don't know a
7070# cross-shell-safe way of doing it -wolever)
71- if echo " $WORKON_HOME " | grep -e " [$~]"
71+ if echo " $WORKON_HOME " | grep -e " [$~]" > /dev/null
7272then
7373 # This will normalize the path by:
7474 # - Expanding variables (eg, $foo)
@@ -91,20 +91,20 @@ virtualenvwrapper_verify_workon_home () {
9191
9292# Expects 1 argument, the suffix for the new file.
9393virtualenvwrapper_tempfile () {
94- tempfile " virtualenvwrapper-XXXXXX-$1 "
94+ mktemp " virtualenvwrapper-XXXXXX-$1 "
9595}
9696
9797# Run the hooks
9898virtualenvwrapper_run_hook () {
9999 hook_script=" $( virtualenvwrapper_tempfile hook) "
100- " $VIRTUALENVWRAPPER_PYTHON " -c ' from virtualenvwrapper.hook_loader import main; main()' $HOOK_VERBOSE_OPTION --run-hook-and-write-source " $hook_script " " $@ "
100+ " $VIRTUALENVWRAPPER_PYTHON " -c ' from virtualenvwrapper.hook_loader import main; main()' $HOOK_VERBOSE_OPTION --script " $hook_script " " $@ "
101101 result=$?
102102
103103 if [ $result -eq 0 ]
104104 then
105105 source " $hook_script "
106106 fi
107- rm -f " $hook_script " > /dev/null 2>&1
107+ rm -f " $hook_script " & > /dev/null
108108 return $result
109109}
110110
@@ -424,7 +424,7 @@ cpvirtualenv() {
424424 echo " Please specify target virtualenv"
425425 return 1
426426 fi
427- if echo " $WORKON_HOME " | grep -e " /$"
427+ if echo " $WORKON_HOME " | grep -e " /$" > /dev/null
428428 then
429429 env_home=" $WORKON_HOME "
430430 else
0 commit comments