]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
Make env_shasum local in _autoenv_hash_pair
authorDaniel Hahler <git@thequod.de>
Thu, 27 Nov 2014 12:31:44 +0000 (13:31 +0100)
committerDaniel Hahler <git@thequod.de>
Thu, 27 Nov 2014 12:31:44 +0000 (13:31 +0100)
autoenv.zsh

index f105c27a61cb02215e58b36faf0c063092fc4e7b..034b7fef1fae69ad1f30026449877b079ecd736c 100644 (file)
@@ -124,7 +124,8 @@ zmodload -F zsh/stat b:zstat
 
 _autoenv_hash_pair() {
   local env_file=${1:A}
-  if (( $+2 )); then
+  local env_shasum
+  if [[ -n $2 ]]; then
     env_shasum=$2
   else
     env_shasum=$(shasum $env_file | cut -d' ' -f1)