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('module'); try { (new Compress())->moduleToZip($package); } catch (\Exception $e) { exit($output->error($e->getMessage())); } $output->info($package . ' zip successfully~'); } }