Skip to content

Commit aa7b3b8

Browse files
Consistent use of double quotes arround env vars
... except arround the ${plugins} variabel used in the for loop because that would prevent word split and make the loop execute only once, instead of once per word (ie. plugin)
1 parent 84c594b commit aa7b3b8

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

dockerhub/entrypoint.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
set -e
44

5-
echo ${KUBE_CONFIG_DATA} | base64 -d > kubeconfig
5+
echo "${KUBE_CONFIG_DATA}" | base64 -d > kubeconfig
66
export KUBECONFIG="${PWD}/kubeconfig"
7-
chmod 600 ${PWD}/kubeconfig
7+
chmod 600 "${PWD}/kubeconfig"
88

99
if [[ -n "${INPUT_PLUGINS// /}" ]]
1010
then
11-
plugins=$(echo ${INPUT_PLUGINS} | tr ",")
11+
plugins="$(echo "${INPUT_PLUGINS}" | tr ",")"
1212

1313
for plugin in ${plugins}
1414
do
1515
echo "installing helm plugin: [${plugin}]"
16-
helm plugin install ${plugin}
16+
helm plugin install "${plugin}"
1717
done
1818
fi
1919

2020
echo "running entrypoint command(s)"
2121

2222
response=$(sh -c " ${INPUT_COMMAND}")
2323

24-
echo "response<<EOF" >> ${GITHUB_OUTPUT}
25-
echo "$response" >> ${GITHUB_OUTPUT}
26-
echo "EOF" >> ${GITHUB_OUTPUT}
24+
echo "response<<EOF" >> "${GITHUB_OUTPUT}"
25+
echo "$response" >> "${GITHUB_OUTPUT}"
26+
echo "EOF" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)