mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
44 lines
1.5 KiB
PHP
44 lines
1.5 KiB
PHP
<?php
|
||
|
||
// +----------------------------------------------------------------------
|
||
// | Library for ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网站: http://library.thinkadmin.top
|
||
// +----------------------------------------------------------------------
|
||
// | 开源协议 ( https://mit-license.org )
|
||
// +----------------------------------------------------------------------
|
||
// | gitee 仓库地址 :https://gitee.com/zoujingli/ThinkLibrary
|
||
// | github 仓库地址 :https://github.com/zoujingli/ThinkLibrary
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace library\command\sync;
|
||
|
||
use library\command\Sync;
|
||
use think\console\Input;
|
||
use think\console\Output;
|
||
|
||
/**
|
||
* Class Service
|
||
* @package library\command\sync
|
||
*/
|
||
class Service extends Sync
|
||
{
|
||
protected function configure()
|
||
{
|
||
$this->modules = ['application/service/'];
|
||
$this->setName('xsync:service')->setDescription('从远程覆盖本地Service模块的所有代码');
|
||
}
|
||
|
||
protected function execute(Input $input, Output $output)
|
||
{
|
||
$root = str_replace('\\', '/', env('root_path'));
|
||
if (file_exists("{$root}/application/service/sync.lock")) {
|
||
$this->output->error('service module has been locked');
|
||
} else {
|
||
parent::execute($input, $output);
|
||
}
|
||
}
|
||
}
|