Skip to content
Browse files

Merge pull request #17 from blueyed/master

virtualenv#activate: only change $PATH if necessary
  • Loading branch information...
2 parents 67b241a + c5ecc0c commit bd299f05a730b56d1f2d2ccaead0be30e3e8a396 @jmcantrell committed Nov 18, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 autoload/virtualenv.vim
View
8 autoload/virtualenv.vim
@@ -21,7 +21,13 @@ function! virtualenv#activate(name) "{{{1
endif
call virtualenv#deactivate()
let g:virtualenv_path = $PATH
- let $PATH = bin.':'.$PATH
+
+ " Prepend bin to PATH, but only if it's not there already
+ " (activate_this does this also, https://github.com/pypa/virtualenv/issues/14)
+ if $PATH[:len(bin)] != bin.':'
+ let $PATH = bin.':'.$PATH
+ endif
+
python << EOF
import vim, os, sys
activate_this = vim.eval('l:script')

0 comments on commit bd299f0

Please sign in to comment.
Something went wrong with that request. Please try again.