Skip to content

Commit 367c9bf

Browse files
Local composer should take precedence over global composer (#2371)
Co-authored-by: Luca Passini <l.passini@melazeta.com>
1 parent da432e0 commit 367c9bf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

recipe/deploy/vendors.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
// composer version to `.dep/composer.phar`. To use specific composer version
1111
// download desired phar and place it at `.dep/composer.phar`.
1212
set('bin/composer', function () {
13-
if (commandExist('composer')) {
14-
return '{{bin/php}} ' . locateBinaryPath('composer');
15-
}
16-
1713
if (test('[ -f {{deploy_path}}/.dep/composer.phar ]')) {
1814
return '{{bin/php}} {{deploy_path}}/.dep/composer.phar';
1915
}
2016

17+
if (commandExist('composer')) {
18+
return '{{bin/php}} ' . locateBinaryPath('composer');
19+
}
20+
2121
warning("Composer binary wasn't found. Installing latest composer to \"{{deploy_path}}/.dep/composer.phar\".");
2222
run("cd {{deploy_path}} && curl -sS https://getcomposer.org/installer | {{bin/php}}");
2323
run('mv {{deploy_path}}/composer.phar {{deploy_path}}/.dep/composer.phar');

0 commit comments

Comments
 (0)