From: Kefu Chai Date: Sat, 31 Jul 2021 06:09:02 +0000 (+0800) Subject: scripts/build_utils: use "test" to test existence of a directory X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=32039c1f136f05a30cd59b1cc6ac471fb4809def;p=ceph-build.git scripts/build_utils: use "test" to test existence of a directory otherwise we have scaring error message like: ++ ls -A /tmp/venv.flkiJIs23q ls: cannot access '/tmp/venv.flkiJIs23q': No such file or directory + in build log of job of ceph-dev-new-build Signed-off-by: Kefu Chai --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 5b416cd5..5eb7c51a 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -99,7 +99,7 @@ pip_download() { create_virtualenv () { local path=$1 - if [ "$(ls -A $path)" ]; then + if [ -d $path ]; then echo "Will reuse existing virtual env: $path" else if [ $(command -v python3) ]; then