Skip to content

Commit

Permalink
Added php version check on the CLI with message when exiting #25
Browse files Browse the repository at this point in the history
  • Loading branch information
w00fz committed Aug 23, 2014
1 parent 74b838c commit 6add01d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/grav
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env php
<?php

if (version_compare($ver = PHP_VERSION, $req = '5.4.0', '<')) {
exit(sprintf("You are running PHP %s, but Grav needs at least PHP %s to run.\n", $ver, $req));
}

use Symfony\Component\Console\Application;

require_once(__DIR__ . '/../vendor/autoload.php');
Expand Down

0 comments on commit 6add01d

Please sign in to comment.