From: Daniel Hahler Date: Sun, 23 Apr 2017 12:24:17 +0000 (+0200) Subject: tests: test_autoenv_add_to_env: create auth file parent dir (#59) X-Git-Url: http://www.git.stargrave.org/?p=zsh-autoenv.git;a=commitdiff_plain;h=41e0daa35fac4e954861d83a20ff8c3ed812322a tests: test_autoenv_add_to_env: create auth file parent dir (#59) This is required when running single test files, e.g. only cwd.t. --- diff --git a/tests/setup.zsh b/tests/setup.zsh index 9e789ec..31aee20 100644 --- a/tests/setup.zsh +++ b/tests/setup.zsh @@ -30,6 +30,7 @@ fi # Add file ($1), version ($2), and optional hash ($3) to authentication file. test_autoenv_add_to_env() { + [[ -d ${AUTOENV_AUTH_FILE:h} ]] || mkdir -p ${AUTOENV_AUTH_FILE:h} _autoenv_hash_pair $1 1 ${2:-} >>| $AUTOENV_AUTH_FILE }