From bf5e3a70f333cdd228387a6c65abaf575bfe05ca Mon Sep 17 00:00:00 2001 From: Jo Liss Date: Tue, 7 Jul 2020 21:23:05 +0100 Subject: [PATCH] Fix condition (#225) This now checks that the file is readable, like the zsh version. --- executable/Env.re | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executable/Env.re b/executable/Env.re index 923c03c..a9fb881 100644 --- a/executable/Env.re +++ b/executable/Env.re @@ -80,10 +80,10 @@ let printUseOnCd = (~shell) => __fnmcd () { cd "$@" - if [[ -f .node-version && .node-version ]]; then + if [[ -f .node-version && -r .node-version ]]; then echo "fnm: Found .node-version" fnm use - elif [[ -f .nvmrc && .nvmrc ]]; then + elif [[ -f .nvmrc && -r .nvmrc ]]; then echo "fnm: Found .nvmrc" fnm use fi