fix composer production bugs

This commit is contained in:
sunxyw
2023-02-18 07:18:52 +08:00
parent c283a84263
commit 0b8a2dd494
2 changed files with 4 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ class BuildCommand extends Command
}
$target = $build_dir . '/' . $target;
// 确认 Phar 文件可以写入
FileSystem::createDir($build_dir);
FileSystem::ensureFileWritable($target);
$this->comment("目标文件:{$target}");
@@ -51,6 +52,8 @@ class BuildCommand extends Command
unlink($target);
}
// TODO: 增加开发依赖的判定并提醒
$this->info('正在构建 Phar 包');
$this->build(