From 8725b77e0b3406481bd6c8e6a7916896bc30652d Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Thu, 18 Jan 2018 09:47:44 -0800 Subject: [PATCH] Make run_in_workspace.sh pass shellcheck (with suppressions) --- tools/run_tests/artifacts/run_in_workspace.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/artifacts/run_in_workspace.sh b/tools/run_tests/artifacts/run_in_workspace.sh index 5b8af6ab534..20181e077c2 100755 --- a/tools/run_tests/artifacts/run_in_workspace.sh +++ b/tools/run_tests/artifacts/run_in_workspace.sh @@ -18,15 +18,19 @@ # All cmdline args will be executed as a command. set -ex -cd $(dirname $0)/../../.. +cd "$(dirname "$0")/../../.." export repo_root=$(pwd) +# TODO: fix file to pass shellcheck + rm -rf "${WORKSPACE_NAME}" git clone . "${WORKSPACE_NAME}" # clone gRPC submodules, use data from locally cloned submodules where possible +# shellcheck disable=SC1004,SC2016 git submodule foreach 'cd "${repo_root}/${WORKSPACE_NAME}" \ && git submodule update --init --reference ${repo_root}/${name} ${name}' echo "Running in workspace ${WORKSPACE_NAME}" -cd ${WORKSPACE_NAME} +cd "${WORKSPACE_NAME}" +# shellcheck disable=SC2068 $@