Skip to content

Commit cca4cdc

Browse files
a1346054junegunn
authored andcommitted
improve test logic and be explicit about the test
1 parent 8f899aa commit cca4cdc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uninstall

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ if [ -d "${fish_dir}/functions" ]; then
104104
remove "${fish_dir}/functions/fzf.fish"
105105
remove "${fish_dir}/functions/fzf_key_bindings.fish"
106106

107-
if [ "$(ls -A "${fish_dir}/functions")" ]; then
108-
echo "Can't delete non-empty directory: \"${fish_dir}/functions\""
109-
else
107+
if [ -z "$(ls -A "${fish_dir}/functions")" ]; then
110108
rmdir "${fish_dir}/functions"
109+
else
110+
echo "Can't delete non-empty directory: \"${fish_dir}/functions\""
111111
fi
112112
fi
113113

0 commit comments

Comments
 (0)