Skip to content

Commit

Permalink
Update check_version.php
Browse files Browse the repository at this point in the history
  • Loading branch information
pk-fr committed Oct 30, 2015
1 parent 65be54e commit 15abb54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/check_version.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
// Use and abuse at your own risks.
//========================================================================

$yakpro_po_base_directory = dirname(realpath($argv[0]));
$php_parser_git_commandline = 'git clone --branch=1.x https://github.com/nikic/PHP-Parser.git';

if(!file_exists('PHP-Parser/composer.json'))
if(!file_exists("$yakpro_po_base_directory/PHP-Parser/composer.json"))
{
fprintf(STDERR,"Error:\tPHP-Parser is not correctly installed!%sYou can try to use the following command:%s\t# %s%s",PHP_EOL,PHP_EOL,$php_parser_git_commandline,PHP_EOL);
exit(-1);
}

$t_composer = json_decode(file_get_contents('PHP-Parser/composer.json')); //print_r($t_composer);
$t_composer = json_decode(file_get_contents("$yakpro_po_base_directory/PHP-Parser/composer.json")); //print_r($t_composer);
$php_parser_branch = $t_composer->{'extra'}->{'branch-alias'}->{'dev-master'} + 0;
$required_php_version = $t_composer->{'require'}->{'php'};

Expand Down

0 comments on commit 15abb54

Please sign in to comment.