Skip to content

Commit

Permalink
fix eror
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Nov 7, 2019
1 parent 676423b commit 3181140
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/Command/PharCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Swoft\Console\Output\Output;
use Swoft\Stdlib\Helper\Dir;
use Swoft\Stdlib\Helper\Str;
use Swoft\Stdlib\Helper\Sys;
use function filesize;
use function input;
use function is_file;
Expand Down Expand Up @@ -75,7 +74,14 @@ public function pack(Input $input, Output $output): int
'phar file' => $pharFile,
], 'Building Information');

// var_dump(CliHelper::getGitVersion());die;
// git version 2.23.0
$gitver = CliHelper::getGitVersion();
$hasGit = preg_match('/git version ([\d.]+)/', $gitver, $ms) === 1;
// $gVersion = $hasGit ? $ms[1] : '';

if (!$hasGit) {
$cpr->collectVersion(false);
}

// use fast build
if ($input->getBoolOpt('fast')) {
Expand Down

0 comments on commit 3181140

Please sign in to comment.