1. croach
  2. virtualenvwrapper

Commits

Doug Hellmann  committed 62ed7f8

Make --python option to mkvirtualenv not sticky

Fixes a problem with mkvirtualenv in which the value
provided to --python is retained for subsequent calls.

Fixes issue #178

  • Participants
  • Parent commits a3f211a
  • Branches default

Comments (0)

Files changed (3)

File docs/source/history.rst

View file
     completion. Contributed by :bbuser:`davidszotten`.
   - Fix an issue with listing project templates if none are
     installed. (:bbissue:`179`)
+  - Fix an issue with the ``--python`` option to ``mkvirtualenv``
+    becoming *sticky* for future calls that do not explicitly specify
+    the option. (:bbissue:`178`)
 
 3.7
 

File tests/test_mkvirtualenv.sh

View file
     VIRTUALENVWRAPPER_VIRTUALENV=virtualenv
 }
 
+test_mkvirtualenv_python_not_sticky () {
+    typeset _save=$VIRTUALENVWRAPPER_VIRTUALENV
+    VIRTUALENVWRAPPER_VIRTUALENV=true
+    mkvirtualenv --python blah foo
+    assertSame "" "$interpreter"
+    VIRTUALENVWRAPPER_VIRTUALENV=$_save
+}
+
 
 . "$test_dir/shunit2"

File virtualenvwrapper.sh

View file
     typeset envname
     typeset requirements
     typeset packages
+    typeset interpreter
 
     in_args=( "$@" )