Commit 3c38c746 authored by Fabien Potencier's avatar Fabien Potencier

merged branch mheleniak/patch-1 (PR #139)

Commits
-------

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

Discussion
----------

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
parents 1ba36c0c 94c6aa52
......@@ -105,7 +105,7 @@ Phar::mapPhar('silex.phar');
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]) {
case 'update':
$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