Misc cleanup, fix --force logic for build command
This commit is contained in:
@@ -34,16 +34,17 @@ class PackageBuildCommand extends BaseCommand
|
||||
{
|
||||
$registry = $input->getOption("publish");
|
||||
|
||||
$builder = new PackageBuilder($output);
|
||||
|
||||
$version = $input->getArgument("version");
|
||||
$force = $input->getOption("force");
|
||||
|
||||
$builder = new PackageBuilder($output);
|
||||
|
||||
$project = ProjectInfo::read(version:$version);
|
||||
|
||||
if ($registry && file_exists($project->filename) && !$input->getOption("force")) {
|
||||
if (file_exists($project->filename) && !$force) {
|
||||
$output->writeln("<fg=black;bg=yellow>Package file already exists. Pass --force to rebuild it.</>");
|
||||
} else {
|
||||
$builder->build($project, $input->getOption("dirty"), $input->getOption("force"));
|
||||
$builder->build($project, $input->getOption("dirty"), $force);
|
||||
}
|
||||
|
||||
if ($registry) {
|
||||
|
||||
Reference in New Issue
Block a user