improve test logic and be explicit about the test

This commit is contained in:
a1346054 2021-08-14 11:33:22 +00:00 committed by Junegunn Choi
parent 8f899aaf8a
commit cca4cdc4f1
1 changed files with 3 additions and 3 deletions

View File

@ -104,10 +104,10 @@ if [ -d "${fish_dir}/functions" ]; then
remove "${fish_dir}/functions/fzf.fish"
remove "${fish_dir}/functions/fzf_key_bindings.fish"
if [ "$(ls -A "${fish_dir}/functions")" ]; then
echo "Can't delete non-empty directory: \"${fish_dir}/functions\""
else
if [ -z "$(ls -A "${fish_dir}/functions")" ]; then
rmdir "${fish_dir}/functions"
else
echo "Can't delete non-empty directory: \"${fish_dir}/functions\""
fi
fi