Преглед на файлове

make directory-is-empty more robust

Christian Winther преди 1 година
родител
ревизия
1616c7cb11
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      docker/shared/root/docker/helpers.sh

+ 1 - 1
docker/shared/root/docker/helpers.sh

@@ -324,7 +324,7 @@ function file-exists()
 # @exitcode 1 If $1 does *NOT* contain files
 function directory-is-empty()
 {
-    [ -z "$(ls -A "${1}")" ]
+    path-exists "${1}" && [[ -z "$(ls -A "${1}")" ]]
 }
 
 # @description Ensures a directory exists (via mkdir)