Fix running scripts from a directory whose name contains space
This commit is contained in:
parent
9cff4e8548
commit
f1a7e2dc7e
@ -10,7 +10,7 @@ if [[ ! -f "$build_file" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$build_file "$@"
|
"$build_file" "$@"
|
||||||
|
|
||||||
# Remove old YCM libs if present so that YCM can start.
|
# Remove old YCM libs if present so that YCM can start.
|
||||||
rm -f python/*ycm_core.* &> /dev/null
|
rm -f python/*ycm_core.* &> /dev/null
|
||||||
|
10
run_tests.sh
10
run_tests.sh
@ -4,21 +4,21 @@ set -e
|
|||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
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
|
if [ -d "${directory}" ]; then
|
||||||
export PYTHONPATH=${directory}:$PYTHONPATH
|
export PYTHONPATH=${directory}:$PYTHONPATH
|
||||||
fi
|
fi
|
||||||
done
|
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
|
if [ -d "${directory}" ]; then
|
||||||
export PYTHONPATH=${directory}:$PYTHONPATH
|
export PYTHONPATH=${directory}:$PYTHONPATH
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
nosetests -v $SCRIPT_DIR/python
|
nosetests -v "${SCRIPT_DIR}/python"
|
||||||
|
Loading…
Reference in New Issue
Block a user