diff --git a/extend/catcher/command/Tools/CompressPackageCommand.php b/extend/catcher/command/Tools/CompressPackageCommand.php index c40de78..82b73af 100644 --- a/extend/catcher/command/Tools/CompressPackageCommand.php +++ b/extend/catcher/command/Tools/CompressPackageCommand.php @@ -9,24 +9,30 @@ use think\console\Input; use think\console\input\Argument; use think\console\Output; +/** + * 打包模块 + * + * Class CompressPackageCommand + * @package catcher\command\Tools + */ class CompressPackageCommand extends Command { protected function configure() { // 指令配置 - $this->setName('package:zip') - ->addArgument('package', Argument::REQUIRED, 'package name') - ->setDescription('compress package to zip'); + $this->setName('catch:unpack ') + ->addArgument('module', Argument::REQUIRED, 'module name') + ->setDescription('compress module to zip'); } protected function execute(Input $input, Output $output) { - $package = $this->input->getArgument('package'); + $package = $this->input->getArgument('module'); try { (new Compress())->moduleToZip($package); } catch (\Exception $e) { - $output->error($e->getMessage()); + exit($output->error($e->getMessage())); } $output->info($package . ' zip successfully~');