]> gitweb.fluxo.info Git - puppet-php.git/commitdiff
Composer: must set PATH for correct install
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 12 Jan 2016 19:19:09 +0000 (17:19 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 12 Jan 2016 19:19:09 +0000 (17:19 -0200)
manifests/composer.pp

index e33894fccdfa190dd4e2e12386923bdb4e66f138..4ab3337c09c02df613b1e1a41fac02e8a78f516f 100644 (file)
@@ -6,9 +6,11 @@ class php::composer {
 
   # Composer
   exec { 'getcomposer':
-    command => '/usr/bin/wget -O - https://getcomposer.org/installer | /usr/bin/php && /bin/mv composer.phar /usr/local/bin/composer',
-    user    => 'root',
-    cwd     => '/tmp',
-    creates => '/usr/local/bin/composer',
+    # 'The HOME or COMPOSER_HOME environment variable must be set for composer to install correctly'
+    environment => [ 'HOME=/root' ],
+    command     => '/usr/bin/wget -O - https://getcomposer.org/installer | /usr/bin/php && /bin/mv composer.phar /usr/local/bin/composer',
+    user        => 'root',
+    cwd         => '/tmp',
+    creates     => '/usr/local/bin/composer',
   }
 }