Skip to content

Commit

Permalink
Explain failing to activate the default branch when it has no code
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Aug 8, 2024
1 parent 8e16148 commit aade5d5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Command/Environment/EnvironmentActivateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ protected function activateMultiple(array $environments, InputInterface $input,
$output->writeln(
"Operation not available: The environment " . $this->api()->getEnvironmentLabel($environment, 'error') . " can't be activated."
);
if ($environment->is_dirty) {
if ($environment->is_main && !$environment->has_code) {
$output->writeln('');
$output->writeln('The environment has no code yet. Push some code to the environment to activate it.');
} elseif ($environment->is_dirty) {
$output->writeln('');
$output->writeln('An activity is currently in progress on the environment.');
}
continue;
Expand Down

0 comments on commit aade5d5

Please sign in to comment.