mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-11-25 16:31:00 +02:00
Check for file existence in _dotenv_check_authorized_env_file
This commit is contained in:
parent
4662727a22
commit
d114d0a0ea
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user