Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Command/DeployCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ protected function initialize(InputInterface $input, OutputInterface $output): v

if (null !== $customConfigPath && is_readable($customConfigPath)) {
$this->configFilePath = $customConfigPath;

return;
}

$defaultConfigPath = SymfonyConfigPathGuesser::guess($this->projectDir, $input->getArgument('stage'));
if (is_readable($defaultConfigPath)) {
$this->configFilePath = $defaultConfigPath;

return;
}

$this->createDefaultConfigFile($input, $output, $defaultConfigPath, $input->getArgument('stage'));
Expand Down
4 changes: 4 additions & 0 deletions src/Command/RollbackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,15 @@ protected function initialize(InputInterface $input, OutputInterface $output): v

if (null !== $customConfigPath && is_readable($customConfigPath)) {
$this->configFilePath = $customConfigPath;

return;
}

$defaultConfigPath = SymfonyConfigPathGuesser::guess($this->projectDir, $input->getArgument('stage'));
if (is_readable($defaultConfigPath)) {
$this->configFilePath = $defaultConfigPath;

return;
}

throw new \RuntimeException(sprintf("The default configuration file does not exist or it's not readable, and no custom configuration file was given either. Create the '%s' configuration file and run this command again.", $defaultConfigPath));
Expand Down