Shellcheck quoting (#9596)

* Fix SC2006: Use $(...) notation instead of legacy backticked `...`.

* Fix SC2016: Expressions don't expand in single quotes, use double quotes for that.

* Fix SC2046: Quote this to prevent word splitting.

* Fix SC2053: Quote the right-hand side of == in [[ ]] to prevent glob matching.

* Fix SC2068: Double quote array expansions to avoid re-splitting elements.

* Fix SC2086: Double quote to prevent globbing and word splitting.

* Fix SC2102: Ranges can only match single chars (mentioned due to duplicates).

* Fix SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A\"B\"C"?

* Fix SC2145: Argument mixes string and array. Use * or separate argument.

* Fix SC2209: warning: Use var=$(command) to assign output (or quote to assign string).

Co-authored-by: Mehrdad <noreply@github.com>
This commit is contained in:
mehrdadn
2020-07-21 21:56:41 -05:00
committed by GitHub
co-authored by Mehrdad
parent 382b314241
commit b14728d999
28 changed files with 166 additions and 165 deletions
+5 -5
View File
@@ -39,7 +39,7 @@ mkdir -p $DOWNLOAD_DIR
mkdir -p .whl
# Use the latest version of Node.js in order to build the dashboard.
source $HOME/.nvm/nvm.sh
source "$HOME"/.nvm/nvm.sh
nvm use node
# Build the dashboard so its static assets can be included in the wheel.
@@ -61,11 +61,11 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
# Install Python.
INST_PATH=python_downloads/$PY_INST
curl $MACPYTHON_URL/$PY_VERSION/$PY_INST > $INST_PATH
sudo installer -pkg $INST_PATH -target /
curl $MACPYTHON_URL/"$PY_VERSION"/"$PY_INST" > "$INST_PATH"
sudo installer -pkg "$INST_PATH" -target /
PYTHON_EXE=$MACPYTHON_PY_PREFIX/$PY_MM/bin/python$PY_MM
PIP_CMD="$(dirname $PYTHON_EXE)/pip$PY_MM"
PIP_CMD="$(dirname "$PYTHON_EXE")/pip$PY_MM"
pushd /tmp
# Install latest version of pip to avoid brownouts.
@@ -80,7 +80,7 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
$PIP_CMD install -q setuptools_scm==3.1.0
# Fix the numpy version because this will be the oldest numpy version we can
# support.
$PIP_CMD install -q numpy==$NUMPY_VERSION cython==0.29.15
$PIP_CMD install -q numpy=="$NUMPY_VERSION" cython==0.29.15
# Install wheel to avoid the error "invalid command 'bdist_wheel'".
$PIP_CMD install -q wheel
# Set the commit SHA in __init__.py.
+3 -3
View File
@@ -32,7 +32,7 @@ export PATH=$PATH:/root/bin
# Install and use the latest version of Node.js in order to build the dashboard.
set +x
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
source $HOME/.nvm/nvm.sh
source "$HOME"/.nvm/nvm.sh
nvm install node
nvm use node
@@ -57,7 +57,7 @@ for ((i=0; i<${#PYTHONS[@]}; ++i)); do
pushd python
# Fix the numpy version because this will be the oldest numpy version we can
# support.
/opt/python/${PYTHON}/bin/pip install -q numpy==${NUMPY_VERSION} cython==0.29.15
/opt/python/"${PYTHON}"/bin/pip install -q numpy=="${NUMPY_VERSION}" cython==0.29.15
# Set the commit SHA in __init__.py.
if [ -n "$TRAVIS_COMMIT" ]; then
sed -i.bak "s/{{RAY_COMMIT_SHA}}/$TRAVIS_COMMIT/g" ray/__init__.py && rm ray/__init__.py.bak
@@ -66,7 +66,7 @@ for ((i=0; i<${#PYTHONS[@]}; ++i)); do
exit 1
fi
PATH=/opt/python/${PYTHON}/bin:$PATH /opt/python/${PYTHON}/bin/python setup.py bdist_wheel
PATH=/opt/python/${PYTHON}/bin:$PATH /opt/python/"${PYTHON}"/bin/python setup.py bdist_wheel
# In the future, run auditwheel here.
mv dist/*.whl ../.whl/
popd
@@ -6,7 +6,7 @@
if [ -z "$KRSYNC_STARTED" ]; then
export KRSYNC_STARTED=true
exec rsync --blocking-io --rsh "$0" $@
exec rsync --blocking-io --rsh "$0" "$@"
fi
# Running as --rsh
@@ -22,4 +22,4 @@ if [ "X$pod" = "X-l" ]; then
shift
fi
exec kubectl $namespace exec -i $pod -- "$@"
exec kubectl "$namespace" exec -i "$pod" -- "$@"