Skip to content

Commit a0e35ba

Browse files
committed
fix: change to give priority to first command discoverd
Now you can replace CI4's commands with your commands in app/Commands/.
1 parent 24a7673 commit a0e35ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/CLI/Commands.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function discoverCommands()
125125
/** @var BaseCommand $class */
126126
$class = new $className($this->logger, $this);
127127

128-
if (isset($class->group)) {
128+
if (isset($class->group) && ! isset($this->commands[$class->name])) {
129129
$this->commands[$class->name] = [
130130
'class' => $className,
131131
'file' => $file,

0 commit comments

Comments
 (0)