From f1a7e2dc7e90745814c2d790717ed87282f668be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= Date: Thu, 3 Jul 2014 17:17:23 -0700 Subject: [PATCH] Fix running scripts from a directory whose name contains space --- install.sh | 2 +- run_tests.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index 0d7dc4f3..f1969800 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ if [[ ! -f "$build_file" ]]; then exit 1 fi -$build_file "$@" +"$build_file" "$@" # Remove old YCM libs if present so that YCM can start. rm -f python/*ycm_core.* &> /dev/null diff --git a/run_tests.sh b/run_tests.sh index b75ee08d..a1bc1977 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -4,21 +4,21 @@ set -e SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -$SCRIPT_DIR/third_party/ycmd/build.sh +"${SCRIPT_DIR}/third_party/ycmd/build.sh" -flake8 --select=F,C9 --max-complexity=10 $SCRIPT_DIR/python +flake8 --select=F,C9 --max-complexity=10 "${SCRIPT_DIR}/python" -for directory in $SCRIPT_DIR/third_party/*; do +for directory in "${SCRIPT_DIR}"/third_party/*; do if [ -d "${directory}" ]; then export PYTHONPATH=${directory}:$PYTHONPATH fi done -for directory in $SCRIPT_DIR/third_party/ycmd/third_party/*; do +for directory in "${SCRIPT_DIR}"/third_party/ycmd/third_party/*; do if [ -d "${directory}" ]; then export PYTHONPATH=${directory}:$PYTHONPATH fi done -nosetests -v $SCRIPT_DIR/python +nosetests -v "${SCRIPT_DIR}/python"