1
0
mirror of https://github.com/Tarrasch/zsh-autoenv.git synced 2024-11-22 07:20:59 +02:00

Check for file existence in _dotenv_check_authorized_env_file

This commit is contained in:
Daniel Hahler 2014-11-15 16:09:02 +01:00
parent 4662727a22
commit d114d0a0ea

View File

@ -57,6 +57,9 @@ _dotenv_read_answer() {
}
_dotenv_check_authorized_env_file() {
if ! [[ -f $1 ]]; then
return 1
fi
if ! _dotenv_authorized_env_file $1; then
echo "Attempting to load unauthorized env file: $1"
echo ""
@ -109,7 +112,7 @@ _dotenv_chpwd_handler() {
fi
fi
if ! [[ -f $env_file ]] || ! _dotenv_check_authorized_env_file $env_file; then
if ! _dotenv_check_authorized_env_file $env_file; then
return
fi