From b790e2569341cc318064f0f9c985de5b6f973b13 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Wed, 1 Jul 2020 14:22:56 +0200 Subject: [PATCH] Fix Composer global bin-dir path detection. --- home/dotfiles/profile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/home/dotfiles/profile b/home/dotfiles/profile index 77e0402..ef0e45a 100644 --- a/home/dotfiles/profile +++ b/home/dotfiles/profile @@ -136,8 +136,15 @@ section_end # composer section "composer" if [ $PROFILE_COMPOSER -gt 0 ]; then - PATH="$PATH:$(composer config --global --absolute bin-dir)" - export PATH + composer_path="$(composer global config --global --absolute bin-dir -q)" + if [ -n "$composer_path" ] + then + log "Detected composer bin path: $composer_path" + PATH="$PATH:$composer_path" + export PATH + else + log "No composer bin path detected." + fi fi section_end