mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 04:14:57 +08:00
improve autoenv script
* properly quote DIR variable (it might contain spaces) * use builtin string magic instead of `dirname`
This commit is contained in:
6
.env
6
.env
@@ -1,5 +1,5 @@
|
||||
DIR=`dirname $0`
|
||||
if [ -z "$VIRTUAL_ENV" ] && [ -f $DIR/../venv.mitmproxy/bin/activate ]; then
|
||||
DIR="${0%/*}"
|
||||
if [ -z "$VIRTUAL_ENV" ] && [ -f "$DIR/../venv.mitmproxy/bin/activate" ]; then
|
||||
echo "Activating mitmproxy virtualenv..."
|
||||
source $DIR/../venv.mitmproxy/bin/activate
|
||||
source "$DIR/../venv.mitmproxy/bin/activate"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user