Skip to content

Commit 3dcedc4

Browse files
committed
fixed token pass. Fixes #90
1 parent 5e8eb72 commit 3dcedc4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

gh-md-toc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,16 @@ gh_toc_md2html() {
6262
fi
6363
fi
6464
if [ ! -z "${TOKEN}" ]; then
65-
AUTHORIZATION="--header \"Authorization: token ${TOKEN}\""
65+
AUTHORIZATION="Authorization: token ${TOKEN}"
6666
fi
6767

6868
# echo $URL 1>&2
69-
OUTPUT="$(curl -s --user-agent "$gh_user_agent" \
70-
--data-binary @"$gh_file_md" -H "Content-Type:text/plain" \
71-
${AUTHORIZATION} \
72-
$URL)"
69+
OUTPUT=$(curl -s -v \
70+
--user-agent "$gh_user_agent" \
71+
--data-binary @"$gh_file_md" \
72+
-H "Content-Type:text/plain" \
73+
-H "$AUTHORIZATION" \
74+
"$URL")
7375

7476
if [ "$?" != "0" ]; then
7577
echo "XXNetworkErrorXX"

0 commit comments

Comments
 (0)