mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-27 05:43:06 +07:00
Fix composer peer fingerprint error for old PHP
This commit is contained in:
parent
03eb8cc744
commit
6bd872ad2c
@ -139,6 +139,10 @@ add_tool() {
|
|||||||
if [ -n "$COMPOSER_TOKEN" ]; then
|
if [ -n "$COMPOSER_TOKEN" ]; then
|
||||||
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
|
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
|
||||||
fi
|
fi
|
||||||
|
# TODO: Remove after composer 2.0 update, fixes peer fingerprint error
|
||||||
|
if [[ "$version" =~ $old_versions ]]; then
|
||||||
|
composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org
|
||||||
|
fi
|
||||||
elif [ "$tool" = "phan" ]; then
|
elif [ "$tool" = "phan" ]; then
|
||||||
add_extension fileinfo "sudo pecl install -f fileinfo" extension >/dev/null 2>&1
|
add_extension fileinfo "sudo pecl install -f fileinfo" extension >/dev/null 2>&1
|
||||||
add_extension ast "sudo pecl install -f ast" extension >/dev/null 2>&1
|
add_extension ast "sudo pecl install -f ast" extension >/dev/null 2>&1
|
||||||
|
@ -220,6 +220,10 @@ add_tool() {
|
|||||||
if [ -n "$COMPOSER_TOKEN" ]; then
|
if [ -n "$COMPOSER_TOKEN" ]; then
|
||||||
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
|
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
|
||||||
fi
|
fi
|
||||||
|
# TODO: Remove after composer 2.0 update, fixes peer fingerprint error
|
||||||
|
if [[ "$version" =~ $old_versions ]]; then
|
||||||
|
composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org
|
||||||
|
fi
|
||||||
elif [ "$tool" = "cs2pr" ]; then
|
elif [ "$tool" = "cs2pr" ]; then
|
||||||
sudo sed -i 's/\r$//; s/exit(9)/exit(0)/' "$tool_path"
|
sudo sed -i 's/\r$//; s/exit(9)/exit(0)/' "$tool_path"
|
||||||
elif [ "$tool" = "phan" ]; then
|
elif [ "$tool" = "phan" ]; then
|
||||||
|
@ -186,6 +186,10 @@ Function Add-Tool() {
|
|||||||
if (Test-Path env:COMPOSER_TOKEN) {
|
if (Test-Path env:COMPOSER_TOKEN) {
|
||||||
composer -q global config github-oauth.github.com $env:COMPOSER_TOKEN
|
composer -q global config github-oauth.github.com $env:COMPOSER_TOKEN
|
||||||
}
|
}
|
||||||
|
# TODO: Remove after composer 2.0 update, fixes peer fingerprint error
|
||||||
|
if ($version -lt 5.6) {
|
||||||
|
composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org
|
||||||
|
}
|
||||||
} elseif($tool -eq "wp-cli") {
|
} elseif($tool -eq "wp-cli") {
|
||||||
Copy-Item $php_dir\wp-cli.bat -Destination $php_dir\wp.bat
|
Copy-Item $php_dir\wp-cli.bat -Destination $php_dir\wp.bat
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user