diff --git a/src/Command/DeployCommand.php b/src/Command/DeployCommand.php index e3fdb08..eb0f3d6 100644 --- a/src/Command/DeployCommand.php +++ b/src/Command/DeployCommand.php @@ -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')); diff --git a/src/Command/RollbackCommand.php b/src/Command/RollbackCommand.php index d6c4be5..c233615 100644 --- a/src/Command/RollbackCommand.php +++ b/src/Command/RollbackCommand.php @@ -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));