Skip to content

Commit

Permalink
Add --debug flag, closes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Mar 12, 2021
1 parent d51cdc5 commit 8ccd563
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ public function run(ArgumentValueList $arguments = null):void {
$port = $arguments->get("port", 8080);
$bind = $arguments->get("bind", "0.0.0.0");

$serveScript = ["serve", "--port", $port, "--bind", $bind];
if($arguments->contains("debug")) {
array_push($serveScript, "--debug");
}

$this->executeScript(
$arguments,
["serve", "--port", $port, "--bind", $bind],
$serveScript,
["build", "--default", "vendor/phpgt/webengine/build.default.json", "--watch"],
["cron", "--now", "--watch"]
);
Expand All @@ -33,7 +38,9 @@ public function getRequiredNamedParameterList():array {

/** @return NamedParameter[] */
public function getOptionalNamedParameterList():array {
return [];
return [
new NamedParameter("debug")
];
}

/** @return Parameter[] */
Expand All @@ -56,4 +63,4 @@ public function getOptionalParameterList():array {
),
];
}
}
}

0 comments on commit 8ccd563

Please sign in to comment.