diff options
author | a1346054 <36859588+a1346054@users.noreply.github.com> | 2021-08-14 11:33:22 +0000 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-08-15 16:03:26 +0900 |
commit | cca4cdc4f1549e652da1f9688c260f8d5a646c6c (patch) | |
tree | e3b070b879306c43bcb4dd10bb4bf2ba55d16d82 /uninstall | |
parent | 8f899aaf8a1af43e40862bdc6bfa18b307eb6729 (diff) |
improve test logic and be explicit about the test
Diffstat (limited to 'uninstall')
-rwxr-xr-x | uninstall | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |