File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/PatternLab/Console/Commands Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,17 @@ public function run() {
52
52
$ null = Console::findCommandOption ("quiet " );
53
53
$ null = $ null ? " >& /dev/null " : "" ;
54
54
55
+ $ php = isset ($ _SERVER ["_ " ]) ? $ _SERVER ["_ " ] : Config::getOption ("phpBin " );
56
+
57
+ if (!$ php ) {
58
+ $ configPath = Console::getHumanReadablePath (Config::getOption ("configPath " ));
59
+ Console::writeError ("please add the option `phpBin` with the path to PHP to <path> " .$ configPath ."</path> before running the server... " );
60
+ }
61
+
55
62
// start-up the server with the router
56
63
Console::writeInfo ("server started on http:// " .$ host ." - use ctrl+c to exit... " );
57
64
58
- passthru ("cd " .$ publicDir ." && " .$ _SERVER [ " _ " ] ." -S " .$ host ." " .$ coreDir ."/server/router.php " .$ null );
65
+ passthru ("cd " .$ publicDir ." && " .$ php ." -S " .$ host ." " .$ coreDir ."/server/router.php " .$ null );
59
66
60
67
}
61
68
You can’t perform that action at this time.
0 commit comments