From 05c1c4d66392e6edecb5ba3968db56eb1eb0feab Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 20 Feb 2019 17:13:12 -0500 Subject: [PATCH] reverse the logic for handling GH_TOC_TOKEN to correct it The check for GH_TOC_TOKEN was using the empty variable when it is empty, instead of using the default. This change reverses the boolean test to fix it. Signed-off-by: Doug Hellmann --- gh-md-toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gh-md-toc b/gh-md-toc index ab51a5f..cd457a2 100755 --- a/gh-md-toc +++ b/gh-md-toc @@ -52,7 +52,7 @@ gh_toc_load() { gh_toc_md2html() { local gh_file_md=$1 URL=https://api.github.com/markdown/raw - if [ -z "$GH_TOC_TOKEN" ]; then + if [ ! -z "$GH_TOC_TOKEN" ]; then TOKEN=$GH_TOC_TOKEN else TOKEN="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/token.txt"