Skip to content

Commit 2c926c7

Browse files
committed
Catches unbound GITHUB_TOKEN.
1 parent 7bfcdfb commit 2c926c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ML-Frameworks/utils/git-utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function apply-github-patch {
4545
local github_url='https://github.com'
4646

4747
# Download the .patch file.
48-
if [ -n "$GITHUB_TOKEN" ]; then
48+
if [[ "${GITHUB_TOKEN+x}" ]]; then
4949
curl --silent -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.patch" -L $github_api_url/$1/commits/$2 -o $2.patch
5050
else
5151
curl --silent -L $github_url/$1/commit/$2.patch -o $2.patch

0 commit comments

Comments
 (0)