diff --git a/recipes/cachetool.php b/recipes/cachetool.php index 72282ee..edabadd 100644 --- a/recipes/cachetool.php +++ b/recipes/cachetool.php @@ -24,7 +24,7 @@ run("curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar"); } - run("php cachetool.phar apc:cache:clear system {$options}"); + run("{{bin/php}} cachetool.phar apc:cache:clear system {$options}"); })->desc('Clearing APC system cache'); /** @@ -46,5 +46,5 @@ run("curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar"); } - run("php cachetool.phar opcache:reset {$options}"); + run("{{bin/php}} cachetool.phar opcache:reset {$options}"); })->desc('Clearing OPcode cache'); diff --git a/recipes/local.php b/recipes/local.php index 25aacd0..b9d645b 100644 --- a/recipes/local.php +++ b/recipes/local.php @@ -121,29 +121,11 @@ } })->desc('Updating code'); -/** - * Check if command exist in bash. - * - * @param string $command - * @return bool - */ -function commandExistLocally($command) -{ - return runLocally("if hash $command 2>/dev/null; then echo 'true'; fi")->toBool(); -} - /** * Installing vendors tasks. */ task('local:vendors', function () { - if (commandExistLocally('composer')) { - $composer = 'composer'; - } else { - runLocally("cd {{local_release_path}} && curl -sS https://getcomposer.org/installer | php"); - $composer = 'php composer.phar'; - } - - runLocally("cd {{local_release_path}} && {{env_vars}} $composer {{composer_options}}"); + runLocally("cd {{local_release_path}} && {{env_vars}} {{bin/composer}} {{composer_options}}"); })->desc('Installing vendors locally'); /**