2016-09-09 2 views
0

私の具体的な問題は、サブフォルダを変更するたびにsource /venv/bin/activateが実行されているという事実ではありません。問題は毎回私が "実行する" /path/to/.envを印刷する毎回です。autoenv printingは "/" /path/to/.env毎回実行するでしょう。

私はhomebrewを通してバージョン0.2.0でautoenvをインストールしました。

MacBook-Pro:~ llamasramirez$ cd Desktop/oficios/ 
Will run /Users/llamas/Desktop/oficios/.env 
Activating that virtualenv 
Will run /Users/llamas/Desktop/oficios/.env 
(venv) MacBook-Pro:oficios llamasramirez$ cd django_sites/polls/ 
Will run /Users/llamas/Desktop/oficios/.env 
(venv) MacBook-Pro:polls llamasramirez$ 

答えて

0

問題が.envファイルではありませんでしたが判明:

if [ -z "$VIRTUAL_ENV" ]; then 
    CUR_DIR=$(pwd) 
    # search for the next .env 
    while [[ "$PWD" != "/" && "$PWD" != "$home" ]]; do 
     env_file="$PWD/.env" 
     if [[ -f "$env_file" ]]; then 
      BASE_DIR=$(dirname $env_file) 
      break 
     fi 
     builtin cd .. 
    done 

    if [ ! -z "$BASE_DIR" ]; then 
     echo "Activating that virtualenv" 
     source ${BASE_DIR}/venv/bin/activate 
    fi 

    cd $CUR_DIR 
fi 

の端子で出力のようなものがある:これは私の.envファイルです。問題はactivate.shファイルにありました。

迷惑なエコーの指示を行うforループがありますautoenv_init機能オープニング:私はこれをコメントするとエコーが再びポップアップ表示されません

for _file in ${_orderedfiles}; do 
    echo "Will run ${_file}" 
    autoenv_check_authz_and_run "${_file}" 
done 

を。

関連する問題