diff --git a/library/think/console/Command.php b/library/think/console/Command.php index 57b0d8fe..d0caad2f 100644 --- a/library/think/console/Command.php +++ b/library/think/console/Command.php @@ -145,6 +145,9 @@ class Command */ public function run(Input $input, Output $output) { + $this->input = $input; + $this->output = $output; + $this->getSynopsis(true); $this->getSynopsis(false); diff --git a/library/think/console/command/Make.php b/library/think/console/command/Make.php index 74b06053..b508f8d0 100644 --- a/library/think/console/command/Make.php +++ b/library/think/console/command/Make.php @@ -19,11 +19,6 @@ use think\console\Output; abstract class Make extends Command { - /** @var Input */ - protected $input; - - /** @var Output */ - protected $output; protected $type; @@ -34,13 +29,6 @@ abstract class Make extends Command $this->addArgument('name', Argument::REQUIRED, "The name of the class"); } - public function run(Input $input, Output $output) - { - $this->input = $input; - $this->output = $output; - return parent::run($input, $output); - } - protected function execute(Input $input, Output $output) {