Restoring stuff
Publish PHP Package / docker (push) Successful in 10s
Details
Publish PHP Package / docker (push) Successful in 10s
Details
This commit is contained in:
parent
5cae1bf622
commit
3052d68f9b
|
@ -97,8 +97,6 @@ function _get_task_candidates()
|
||||||
//get tasks defined as closures
|
//get tasks defined as closures
|
||||||
foreach($TASKMAN_CLOSURES as $name => $args)
|
foreach($TASKMAN_CLOSURES as $name => $args)
|
||||||
{
|
{
|
||||||
if(isset($cands[$name]))
|
|
||||||
throw new Exception("Task '$name' is already defined");
|
|
||||||
$cands[$name] = $args;
|
$cands[$name] = $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,9 @@ function task($name)
|
||||||
{
|
{
|
||||||
global $TASKMAN_CLOSURES;
|
global $TASKMAN_CLOSURES;
|
||||||
|
|
||||||
|
if(isset($TASKMAN_CLOSURES[$name]))
|
||||||
|
throw new TaskmanException("Task '$name' is already defined");
|
||||||
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$TASKMAN_CLOSURES[$name] = $args;
|
$TASKMAN_CLOSURES[$name] = $args;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue