We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83fadb6 commit 9229753Copy full SHA for 9229753
gh-md-toc
@@ -58,11 +58,11 @@ gh_toc_md2html() {
58
TOKEN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/token.txt"
59
fi
60
if [ -f "$TOKEN" ]; then
61
- URL="$URL?access_token=$(cat $TOKEN)"
+ AUTH_HEADER=("-H" "Authorization: token $(cat $TOKEN)")
62
63
# echo $URL 1>&2
64
OUTPUT="$(curl -s --user-agent "$gh_user_agent" \
65
- --data-binary @"$gh_file_md" -H "Content-Type:text/plain" \
+ --data-binary @"$gh_file_md" -H "Content-Type:text/plain" "${AUTH_HEADER[@]}" \
66
$URL)"
67
68
if [ "$?" != "0" ]; then
0 commit comments