Skip to content

Commit 15e1a54

Browse files
authored
Allows set command description via AsCommand attribute (#45117)
1 parent b6b4a19 commit 15e1a54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Illuminate/Console/Command.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ public function __construct()
7979
// Once we have constructed the command, we'll set the description and other
8080
// related properties of the command. If a signature wasn't used to build
8181
// the command we'll set the arguments and the options on this command.
82-
$this->setDescription((string) $this->description);
82+
if (! isset($this->description)) {
83+
$this->setDescription((string) static::getDefaultDescription());
84+
} else {
85+
$this->setDescription((string) $this->description);
86+
}
8387

8488
$this->setHelp((string) $this->help);
8589

0 commit comments

Comments
 (0)