Skip workon if not in root directory
parent
d42ac438b1
commit
3a943e5813
|
|
@ -15,10 +15,10 @@ function mkpvenv {
|
||||||
about 'create a new virtualenv for this directory'
|
about 'create a new virtualenv for this directory'
|
||||||
group 'pyenv-virtualenv'
|
group 'pyenv-virtualenv'
|
||||||
|
|
||||||
|
cwd=`basename \`pwd\``
|
||||||
eval "touch .env"
|
eval "touch .env"
|
||||||
eval "echo \"#!/bin/bash\" >> .env"
|
eval "echo \"#!/bin/bash\" >> .env"
|
||||||
eval "echo \"eval \"wopvenv\"\" >> .env"
|
eval "echo \"if [ \\\`basename \\\$(pwd)\\\` == \\\"$cwd\\\" ]; then \"eval \"wopvenv\"\"; fi\" >> .env"
|
||||||
cwd=`basename \`pwd\``
|
|
||||||
mkvirtualenv --distribute $cwd
|
mkvirtualenv --distribute $cwd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue