]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - autoenv.zsh
Create path to non-existing auth file (#49)
[zsh-autoenv.git] / autoenv.zsh
index ee0daa0a47af18d0a659971135d42c27e339f190..4df3f53cb0f2a94623e01414f130ba8ca4eeb86f 100644 (file)
@@ -194,6 +194,7 @@ _autoenv_authorized_env_file() {
 _autoenv_authorize() {
   local env_file=${1:A}
   _autoenv_deauthorize $env_file
+  [[ -d ${AUTOENV_AUTH_FILE:h} ]] || mkdir -p ${AUTOENV_AUTH_FILE:h}
   _autoenv_hash_pair $env_file >>| $AUTOENV_AUTH_FILE
 }