Skip to content

Commit feee3b6

Browse files
authored
Merge pull request #19 from imjasonh/copilot/quote-variables-in-conditions
Quote shell variables in setup action extraction path handling
2 parents cacf280 + 706a72c commit feee3b6

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ runs:
3636
esac
3737
3838
os="${RUNNER_OS}"
39-
if [[ $os == "macOS" ]]; then
39+
if [[ "$os" == "macOS" ]]; then
4040
os="Darwin"
4141
fi
4242
@@ -50,16 +50,16 @@ runs:
5050
out=crane.exe
5151
fi
5252
53-
if [[ ! -z ${url} ]]; then
53+
if [[ ! -z "${url}" ]]; then
5454
echo "Installing crane for ${os} on ${arch}"
5555
tmp=$(mktemp -d)
56-
cd ${tmp}
56+
cd "${tmp}"
5757
fname="go-containerregistry_${os}_${arch}.tar.gz"
5858
curl -o "$fname" -fsSL --retry 5 --retry-delay 1 --retry-all-errors "${url}/${fname}"
59-
tar xzf "$fname" ${out}
60-
chmod +x ${tmp}/${out}
61-
PATH=${PATH}:${tmp}
62-
echo "${tmp}" >> $GITHUB_PATH
59+
tar xzf "$fname" "${out}"
60+
chmod +x "${tmp}/${out}"
61+
PATH="${PATH}:${tmp}"
62+
echo "${tmp}" >> "$GITHUB_PATH"
6363
fi
6464
6565
# NB: username doesn't seem to matter.

0 commit comments

Comments
 (0)