modules = ['application/admin/', 'think']; $this->setName('xsync:admin')->setDescription('从远程覆盖本地Admin模块的所有代码'); } /** * 执行更新操作 * @param Input $input * @param Output $output */ protected function execute(Input $input, Output $output) { $root = str_replace('\\', '/', env('root_path')); if (file_exists("{$root}/application/admin/sync.lock")) { $this->output->error("--- Admin 模块已经被锁定,不能继续更新"); } else { parent::execute($input, $output); } } }