소스 검색

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)