mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
improve autoenv script
* properly quote DIR variable (it might contain spaces) * use builtin string magic instead of `dirname`
This commit is contained in:
parent
634f2e2c24
commit
b2f87b9424
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
|
||||
|
Loading…
Reference in New Issue
Block a user