Skip to content

Commit 3cfa850

Browse files
committed
feat(installer): add github token support
This adds support for utilizing the env var GITHUB_TOKEN if it exists for both curl/wget download utils. fixes #2664
1 parent b14a7b5 commit 3cfa850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

www/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ download() {
5656
output="$2"
5757

5858
if command -v curl > /dev/null; then
59-
curl --proto =https --tlsv1.2 -sSfL "$url" "-o$output"
59+
curl --proto =https --tlsv1.2 -sSfL ${GITHUB_TOKEN:+-H "Authorization: Bearer $GITHUB_TOKEN"} "$url" -o"$output"
6060
else
61-
wget --https-only --secure-protocol=TLSv1_2 --quiet "$url" "-O$output"
61+
wget --https-only --secure-protocol=TLSv1_2 --quiet ${GITHUB_TOKEN:+--header="Authorization: Bearer $GITHUB_TOKEN"} "$url" -O"$output"
6262
fi
6363
}
6464

0 commit comments

Comments
 (0)