Add composer global bin directory to PATH

This commit is contained in:
Shivam Mathur
2020-05-04 10:31:14 +05:30
parent 8830cdd08c
commit cf0fdf35f2
3 changed files with 3 additions and 4 deletions

View File

@ -108,6 +108,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"
if [ -n "$COMPOSER_TOKEN" ]; then
composer -q global config github-oauth.github.com "$COMPOSER_TOKEN"
fi
@ -135,7 +136,6 @@ add_composertool() {
prefix=$3
(
composer global require "$prefix$release" >/dev/null 2>&1 &&
sudo ln -sf "$(composer -q global config home)"/vendor/bin/"$tool" /usr/local/bin/"$tool" &&
add_log "$tick" "$tool" "Added"
) || add_log "$cross" "$tool" "Could not setup $tool"
}