diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 8cf50d50..899f2a79 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -51,5 +51,10 @@ alias cgrm='composer global remove' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' -# Add Composer's global binaries to PATH -export PATH=$PATH:$(composer global config bin-dir --absolute) 2>/dev/null +# Add Composer's global binaries to PATH, using Composer if available. +if hash composer 2>/dev/null; then + export PATH=$PATH:$(composer global config bin-dir --absolute) 2>/dev/null +else + export PATH=$PATH:~/.composer/vendor/bin + export PATH=$PATH:~/.config/composer/vendor/bin +fi