mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2025-12-14 02:15:11 +02:00
tests: streamline ZDOTDIR layout, AUTOENV_ENV_FILENAME via setup
Without this, a new subshell would reset the env authentication file.
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
# Not handled in varstash yet.
|
||||
# setopt nounset
|
||||
|
||||
export AUTOENV_ENV_FILENAME="$CRAMTMP/.env_auth"
|
||||
|
||||
if [[ $AUTOENV_ENV_FILENAME[0,4] != '/tmp' ]]; then
|
||||
echo "AUTOENV_ENV_FILENAME is not in /tmp. Aborting."
|
||||
return 1
|
||||
@@ -18,11 +20,7 @@ fi
|
||||
_save_errexit=${options[errexit]}
|
||||
set -e
|
||||
|
||||
if (( ${+functions[antigen-like-loader-function]} )); then
|
||||
TEST_SOURCE_AUTOENV=antigen-like-loader-function
|
||||
else
|
||||
TEST_SOURCE_AUTOENV=(source $TESTDIR/../autoenv.plugin.zsh)
|
||||
fi
|
||||
# Defined in .zshenv, e.g. tests/ZDOTDIR/.zshenv.
|
||||
$TEST_SOURCE_AUTOENV
|
||||
|
||||
# Reset any authentication.
|
||||
|
||||
Reference in New Issue
Block a user