File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
src/PatternLab/Console/Commands Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,21 @@ public function __construct() {
29
29
30
30
public function run () {
31
31
32
- // set-up defaults
33
- $ publicDir = Config::getOption ("publicDir " );
34
- $ coreDir = Config::getOption ("coreDir " );
35
-
36
- Console::writeInfo ("server started on localhost:8080. use ctrl+c to exit... " );
37
- passthru ("cd " .$ publicDir ." && " .$ _SERVER ["_ " ]." -S localhost:8080 " .$ coreDir ."/server/router.php " );
32
+ if (version_compare (phpversion (), '5.4.0 ' , '< ' )) {
33
+
34
+ Console::writeWarning ("you must have PHP 5.4.0 or greater to use this feature. you are using PHP " .phpversion ()."... " );
35
+
36
+ } else {
37
+
38
+ // set-up defaults
39
+ $ publicDir = Config::getOption ("publicDir " );
40
+ $ coreDir = Config::getOption ("coreDir " );
41
+
42
+ // start-up the server with the router
43
+ Console::writeInfo ("server started on localhost:8080. use ctrl+c to exit... " );
44
+ passthru ("cd " .$ publicDir ." && " .$ _SERVER ["_ " ]." -S localhost:8080 " .$ coreDir ."/server/router.php " );
45
+
46
+ }
38
47
39
48
}
40
49
You can’t perform that action at this time.
0 commit comments