From 16e992d9b12b02fba522591d14f0a93cdc34f959 Mon Sep 17 00:00:00 2001 From: Jens Lind Date: Wed, 1 Jul 2015 16:56:33 +0200 Subject: [PATCH] Add composer global bin to $path --- files/composer_global_bin.sh | 7 +++++++ manifests/composer.pp | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 files/composer_global_bin.sh diff --git a/files/composer_global_bin.sh b/files/composer_global_bin.sh new file mode 100755 index 0000000..170d2b9 --- /dev/null +++ b/files/composer_global_bin.sh @@ -0,0 +1,7 @@ +# Add composer global bin to $PATH + +if [ "$COMPOSER_HOME" ]; then + export PATH=$COMPOSER_HOME/vendor/bin:$PATH +else + export PATH=~/.composer/vendor/bin:$PATH +fi diff --git a/manifests/composer.pp b/manifests/composer.pp index d898121..7c82adf 100644 --- a/manifests/composer.pp +++ b/manifests/composer.pp @@ -38,4 +38,10 @@ file { $composer_path: mode => '0755' } + + # Add composer global bin to $PATH + boxen::env_script { 'composer': + source => 'puppet:///modules/php/composer_global_bin.sh', + require => Exec['download-php-composer'] + } }