From e4266005d1d81da3821cc4d77f05f1a566be955f Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Wed, 16 Jan 2019 20:29:25 -0800 Subject: [PATCH] Fix detection of whether directories exist --- scripts/check-diff.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check-diff.sh b/scripts/check-diff.sh index 6d4c2f9..740c55e 100755 --- a/scripts/check-diff.sh +++ b/scripts/check-diff.sh @@ -425,12 +425,12 @@ function install_tools { fi # Install Node packages. - if [ -e package.json ] && [ $( ls node_modules | wc -l ) == 0 ]; then + if [ -e package.json ] && [ ! -e node_modules ]; then npm install --loglevel error > /dev/null fi # Install Composer - if [ -e composer.json ] && check_should_execute 'composer' && [ $( ls vendor | wc -l ) == 0 ]; then + if [ -e composer.json ] && check_should_execute 'composer' && [ ! -e vendor ]; then if ! command -v composer >/dev/null 2>&1; then ( cd "$TEMP_TOOL_PATH"