]> Sergey Matveev's repositories - zsh-autoenv.git/blobdiff - tests/setup.zsh
_autoenv_hash_pair: do not use a subshell (#81)
[zsh-autoenv.git] / tests / setup.zsh
index d1e26ed51e81c627171d3bd47bc4f5ef5546ee01..9b24765ea61452f171d51fae7bf17272e4110f30 100644 (file)
@@ -26,7 +26,10 @@ 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
+  {
+    local ret_pair
+    _autoenv_hash_pair $1 1 ${2:-} && echo $ret_pair
+  } >>| $AUTOENV_AUTH_FILE
 }
 
 # Add enter and leave env files to authentication file.