Commit 94c6aa52 authored by Mateusz Heleniak's avatar Mateusz Heleniak

fixed CLI commands to work when script is called from other directory

Currently due to 9c95e2f6 change, running silex.phar in CLI from other directory takes no effect. Affected commands:

    php vendors/silex/silex.phar check
    php vendors/silex/silex.phar update
    php vendors/silex/silex.phar version
parent 1ba36c0c
...@@ -105,7 +105,7 @@ Phar::mapPhar('silex.phar'); ...@@ -105,7 +105,7 @@ Phar::mapPhar('silex.phar');
require_once 'phar://silex.phar/autoload.php'; require_once 'phar://silex.phar/autoload.php';
if ('cli' === php_sapi_name() && basename(__FILE__) === $argv[0] && isset($argv[1])) { if ('cli' === php_sapi_name() && basename(__FILE__) === basename($argv[0]) && isset($argv[1])) {
switch ($argv[1]) { switch ($argv[1]) {
case 'update': case 'update':
$remoteFilename = 'http://silex-project.org/get/silex.phar'; $remoteFilename = 'http://silex-project.org/get/silex.phar';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment