Skip to content

Commit 3f494d5

Browse files
committed
always print out strategy
1 parent 0581aa0 commit 3f494d5

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/Command/Environment/EnvironmentPushCommand.php

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
143143

144144
$strategy = $input->getOption('deploy-strategy');
145145
if ($strategy !== null && $strategy !== 'rolling' && $strategy !== 'stopstart') {
146-
$this->stdErr->writeln("Invalid deploy strategy <error>$strategy</error>, should be 'rolling' or 'stopstart'.");
146+
$this->stdErr->writeln(sprintf('Invalid deploy strategy <error>%s</error>, should be "rolling" or "stopstart"', $strategy));
147147
return 1;
148148
}
149149

@@ -182,19 +182,14 @@ protected function execute(InputInterface $input, OutputInterface $output)
182182
}
183183
}
184184

185-
$this->stdErr->writeln('');
186-
187-
if ($strategy !== null) {
188-
# If Automatic deployments enabled on the env
189-
if (!$targetEnvironment->operationAvailable('deploy', true)) {
190-
if ($strategy === 'rolling') {
191-
$this->stdErr->writeln('The deployment will not cause downtime as "rolling" strategy was specified.');
192-
}
193-
} else {
194-
$this->stdErr->writeln('The activity will be staged, ignoring the deployment strategy.');
195-
}
185+
if (!$targetEnvironment->operationAvailable('deploy', true)) {
186+
$this->stdErr->writeln(sprintf('Deployment strategy: <info>%s</info>', $strategy ?: "stopstart"));
187+
} else {
188+
$this->stdErr->writeln('The activity will be staged, ignoring the deployment strategy.');
196189
}
197190

191+
$this->stdErr->writeln('');
192+
198193
if (!$questionHelper->confirm('Are you sure you want to continue?')) {
199194
return 1;
200195
}

0 commit comments

Comments
 (0)