Add support to configure GitHub OAuth token in composer

This commit is contained in:
Shivam Mathur
2020-03-25 07:44:38 +05:30
parent 6c93dbd391
commit a2b261d79a
3 changed files with 9 additions and 0 deletions

View File

@ -108,6 +108,9 @@ add_tool() {
sudo chmod a+x "$tool_path"
if [ "$tool" = "composer" ]; then
composer -q global config process-timeout 0
if [ -n "$COMPOSER_TOKEN" ]; then
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
fi
elif [ "$tool" = "phive" ]; then
add_extension curl "sudo pecl install -f curl" extension >/dev/null 2>&1
add_extension mbstring "sudo pecl install -f mbstring" extension >/dev/null 2>&1