Skip to content

Commit

Permalink
CLI-1181: [pull:code] disable scripts for build branches
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Oct 25, 2023
1 parent 7ccc649 commit 0146d83
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/Command/Pull/PullCommandBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,21 @@ private function promptChooseDatabases(
}

protected function runComposerScripts(callable $outputCallback = NULL): void {
if (file_exists($this->dir . '/composer.json') && $this->localMachineHelper->commandExists('composer')) {
$this->checklist->addItem("Installing Composer dependencies");
$this->composerInstall($outputCallback);
$this->checklist->completePreviousItem();
if (!file_exists(Path::join($this->dir, 'composer.json'))) {
$this->logger->notice('composer.json file not found. Skipping composer install.');
return;

Check warning on line 512 in src/Command/Pull/PullCommandBase.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Pull/PullCommandBase.php#L511-L512

Added lines #L511 - L512 were not covered by tests
}
else {
$this->logger->notice('composer or composer.json file not found. Skipping composer install.');
if (!$this->localMachineHelper->commandExists('composer')) {
$this->logger->notice('Composer not found. Skipping composer install.');
return;

Check warning on line 516 in src/Command/Pull/PullCommandBase.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Pull/PullCommandBase.php#L515-L516

Added lines #L515 - L516 were not covered by tests
}
if (file_exists(Path::join($this->dir, 'vendor'))) {
$this->logger->notice('Composer dependencies already installed. Skipping composer install.');
return;

Check warning on line 520 in src/Command/Pull/PullCommandBase.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Pull/PullCommandBase.php#L519-L520

Added lines #L519 - L520 were not covered by tests
}
$this->checklist->addItem("Installing Composer dependencies");

Check warning on line 522 in src/Command/Pull/PullCommandBase.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $this->logger->notice('Composer dependencies already installed. Skipping composer install.'); return; } - $this->checklist->addItem("Installing Composer dependencies"); + $this->composerInstall($outputCallback); $this->checklist->completePreviousItem(); }
$this->composerInstall($outputCallback);
$this->checklist->completePreviousItem();

Check warning on line 524 in src/Command/Pull/PullCommandBase.php

View workflow job for this annotation

GitHub Actions / Mutation Testing

Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } $this->checklist->addItem("Installing Composer dependencies"); $this->composerInstall($outputCallback); - $this->checklist->completePreviousItem(); + } private function determineSite(string|\AcquiaCloudApi\Response\EnvironmentResponse|array $environment, InputInterface $input) : mixed {
}

private function determineSite(string|\AcquiaCloudApi\Response\EnvironmentResponse|array $environment, InputInterface $input): mixed {
Expand Down

0 comments on commit 0146d83

Please sign in to comment.