From dc48c3132757a6125203368207d71ac1fd32cc0f Mon Sep 17 00:00:00 2001 From: diosmosis <benakamoorthi@fastmail.fm> Date: Thu, 28 Aug 2014 19:56:16 -0700 Subject: [PATCH] Fix php-versions option handling in generate:travis-yml command. --- plugins/CoreConsole/Commands/GenerateTravisYmlFile.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/CoreConsole/Commands/GenerateTravisYmlFile.php b/plugins/CoreConsole/Commands/GenerateTravisYmlFile.php index 5c3d44f53e..1bd68cf0f7 100644 --- a/plugins/CoreConsole/Commands/GenerateTravisYmlFile.php +++ b/plugins/CoreConsole/Commands/GenerateTravisYmlFile.php @@ -37,7 +37,7 @@ class GenerateTravisYmlFile extends ConsoleCommand "Github token of a user w/ push access to this repository. Used to auto-commit updates to the " . ".travis.yml file and checkout dependencies. Will be encrypted in the .travis.yml file.\n\n" . "If not supplied, the .travis.yml will fail the build if it needs updating.") - ->addOption('php-versions', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, + ->addOption('php-versions', null, InputOption::VALUE_OPTIONAL, "List of PHP versions to test against, ie, 5.4,5.5,5.6. Defaults to: 5.3.3,5.4,5.5,5.6.") ->addOption('dump', null, InputOption::VALUE_REQUIRED, "Debugging option. Saves the output .travis.yml to the specified file."); } @@ -62,7 +62,9 @@ class GenerateTravisYmlFile extends ConsoleCommand $view->setGenerateYmlCommand($thisConsoleCommand); $phpVersions = $input->getOption('php-versions'); - $view->setPhpVersions($phpVersions); + if (!empty($phpVersions)) { + $view->setPhpVersions(explode(',', $phpVersions)); + } if (file_exists($outputYmlPath)) { $output->writeln("<info>Found existing YAML file at $outputYmlPath.</info>"); -- GitLab