mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
use built-in default value
This commit is contained in:
@@ -19,14 +19,14 @@ class BuildCommand extends Command
|
|||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this->setHelp('此功能将会把整个项目打包为 Phar');
|
$this->setHelp('此功能将会把整个项目打包为 Phar');
|
||||||
$this->addOption('target', 'D', InputOption::VALUE_REQUIRED, '指定输出文件位置');
|
$this->addOption('target', 'D', InputOption::VALUE_REQUIRED, '指定输出文件位置', 'zm.phar');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function handle(): int
|
protected function handle(): int
|
||||||
{
|
{
|
||||||
$this->ensurePharWritable();
|
$this->ensurePharWritable();
|
||||||
|
|
||||||
$target = $this->input->getOption('target') ?? 'zm.phar';
|
$target = $this->input->getOption('target');
|
||||||
if (FileSystem::isRelativePath($target)) {
|
if (FileSystem::isRelativePath($target)) {
|
||||||
$target = SOURCE_ROOT_DIR . '/' . $target;
|
$target = SOURCE_ROOT_DIR . '/' . $target;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user