diff --git a/code/worker.sh b/code/worker.sh index 562aa0bd..29242283 100644 --- a/code/worker.sh +++ b/code/worker.sh @@ -17,10 +17,10 @@ fi # If the URL begins with https://github.com, then treat it specially # https://github.com/egoist/devdocs-desktop/ -if [ ${URL:0:17} == https://github.com ] ; then +if [ ${URL:0:18} == https://github.com ] ; then echo "GitHub URL detected" - GHUSER=$(echo $URL | cut -d '/' -f 4) - GHREPO=$(echo $URL | cut -d '/' -f 5) + GHUSER=$(echo "$URL" | cut -d '/' -f 4) + GHREPO=$(echo "$URL" | cut -d '/' -f 5) URL="https://api.github.com/repos/$GHUSER/$GHREPO/releases/latest" echo "URL from GitHub: $URL" fi