Commits

Doug Hellmann committed f19032a

fix the postmkvirtualenv hook

Comments (0)

Files changed (2)

     assertSame "env2" $(basename "$VIRTUAL_ENV")
 }
 
+test_postmkvirtualenv () {
+    echo "echo GLOBAL postmkvirtualenv > $test_dir/catch_output" > "$WORKON_HOME/postmkvirtualenv"
+    mkvirtualenv "env3"
+    output=$(cat "$test_dir/catch_output")
+    expected="GLOBAL postmkvirtualenv"
+    assertSame "$expected" "$output"
+    rm -f "$WORKON_HOME/postmkvirtualenv"
+    deactivate
+    rmvirtualenv "env3"
+}
+
 test_no_virtualenv () {
     old_path="$PATH"
     PATH="/usr/bin:/usr/local/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$HOME/bin"

virtualenvwrapper_bashrc

     virtualenvwrapper_make_hook "$WORKON_HOME/$envname/bin/postdeactivate" "This hook is sourced after the virtualenv is deactivated."
     # Now activate the new environment
     workon "$envname"
-    virtualenvwrapper_source_hook "$WORKON_HOME/$envname/postmkvirtualenv"
+    virtualenvwrapper_source_hook "$WORKON_HOME/postmkvirtualenv"
 }
 
 # Remove an environment, in the WORKON_HOME.