From 9c266d4158a2b9a769593fff66f0b9b82f3530a7 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Sun, 10 May 2020 18:43:58 +0530 Subject: [PATCH] Fix username hardcode in composer PATH --- src/scripts/darwin.sh | 2 +- src/scripts/linux.sh | 2 +- src/scripts/win32.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 70a28af8..451ba1b6 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -114,7 +114,7 @@ add_tool() { sudo chmod a+x "$tool_path" if [ "$tool" = "composer" ]; then 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 composer -q global config github-oauth.github.com "$COMPOSER_TOKEN" fi diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index 649954e1..41cf241e 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -210,7 +210,7 @@ add_tool() { sudo chmod a+x "$tool_path" if [ "$tool" = "composer" ]; then 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 composer -q global config github-oauth.github.com "$COMPOSER_TOKEN" fi diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 6691bb85..18791125 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -171,7 +171,7 @@ Function Add-Tool() { (Get-Content $php_dir/cs2pr).replace('exit(9)', 'exit(0)') | Set-Content $php_dir/cs2pr } elseif($tool -eq "composer") { 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) { composer -q global config github-oauth.github.com $env:COMPOSER_TOKEN }