Skip to content
This repository was archived by the owner on Apr 26, 2020. It is now read-only.

Commit 01d1a3b

Browse files
author
Oanh Nguyen
committed
Merge pull request #44 from oanhnn/fix-for-custom-bin-feature
Fix for custom bin feature
2 parents bdcf49f + d64c9f0 commit 01d1a3b

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

recipes/cachetool.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
run("curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar");
2525
}
2626

27-
run("php cachetool.phar apc:cache:clear system {$options}");
27+
run("{{bin/php}} cachetool.phar apc:cache:clear system {$options}");
2828
})->desc('Clearing APC system cache');
2929

3030
/**
@@ -46,5 +46,5 @@
4646
run("curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar");
4747
}
4848

49-
run("php cachetool.phar opcache:reset {$options}");
49+
run("{{bin/php}} cachetool.phar opcache:reset {$options}");
5050
})->desc('Clearing OPcode cache');

recipes/local.php

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,11 @@
121121
}
122122
})->desc('Updating code');
123123

124-
/**
125-
* Check if command exist in bash.
126-
*
127-
* @param string $command
128-
* @return bool
129-
*/
130-
function commandExistLocally($command)
131-
{
132-
return runLocally("if hash $command 2>/dev/null; then echo 'true'; fi")->toBool();
133-
}
134-
135124
/**
136125
* Installing vendors tasks.
137126
*/
138127
task('local:vendors', function () {
139-
if (commandExistLocally('composer')) {
140-
$composer = 'composer';
141-
} else {
142-
runLocally("cd {{local_release_path}} && curl -sS https://getcomposer.org/installer | php");
143-
$composer = 'php composer.phar';
144-
}
145-
146-
runLocally("cd {{local_release_path}} && {{env_vars}} $composer {{composer_options}}");
128+
runLocally("cd {{local_release_path}} && {{env_vars}} {{bin/composer}} {{composer_options}}");
147129
})->desc('Installing vendors locally');
148130

149131
/**

0 commit comments

Comments
 (0)