We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5e20f7d + 2c926c7 commit 37a46c1Copy full SHA for 37a46c1
1 file changed
ML-Frameworks/utils/git-utils.sh
@@ -45,7 +45,7 @@ function apply-github-patch {
45
local github_url='https://github.com'
46
47
# Download the .patch file.
48
- if [ -n "$GITHUB_TOKEN" ]; then
+ if [[ "${GITHUB_TOKEN+x}" ]]; then
49
curl --silent -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.patch" -L $github_api_url/$1/commits/$2 -o $2.patch
50
else
51
curl --silent -L $github_url/$1/commit/$2.patch -o $2.patch
0 commit comments