Fix username hardcode in composer PATH

This commit is contained in:
Shivam Mathur 2020-05-10 18:43:58 +05:30
parent 0135ee2ed1
commit 9c266d4158
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ add_tool() {
sudo chmod a+x "$tool_path" sudo chmod a+x "$tool_path"
if [ "$tool" = "composer" ]; then if [ "$tool" = "composer" ]; then
composer -q global config process-timeout 0 composer -q global config process-timeout 0
echo "::add-path::/Users/runner/.composer/vendor/bin" echo "::add-path::/Users/$USER/.composer/vendor/bin"
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

View File

@ -210,7 +210,7 @@ add_tool() {
sudo chmod a+x "$tool_path" sudo chmod a+x "$tool_path"
if [ "$tool" = "composer" ]; then if [ "$tool" = "composer" ]; then
composer -q global config process-timeout 0 composer -q global config process-timeout 0
echo "::add-path::/home/runner/.composer/vendor/bin" echo "::add-path::/home/$USER/.composer/vendor/bin"
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

View File

@ -171,7 +171,7 @@ Function Add-Tool() {
(Get-Content $php_dir/cs2pr).replace('exit(9)', 'exit(0)') | Set-Content $php_dir/cs2pr (Get-Content $php_dir/cs2pr).replace('exit(9)', 'exit(0)') | Set-Content $php_dir/cs2pr
} elseif($tool -eq "composer") { } elseif($tool -eq "composer") {
composer -q global config process-timeout 0 composer -q global config process-timeout 0
Write-Output "::add-path::C:/Users/runneradmin/AppData/Roaming/Composer/vendor/bin" Write-Output "::add-path::$env:APPDATA\Composer\vendor\bin"
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
} }