Fix cli environment option handling

This commit is contained in:
Stepan Strelets 2017-03-26 01:00:50 +03:00 committed by Dmitry Khomutov
parent 8c1a26697a
commit 5da247afc7
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9

View file

@ -60,7 +60,7 @@ class CreateBuildCommand extends Command
$projectId = $input->getArgument('projectId');
$commitId = $input->getOption('commit');
$branch = $input->getOption('branch');
$environment = $input->getOption('environment');
$environment = $input->hasOption('environment') ? $input->getOption('environment') : null;
$project = $this->projectStore->getById($projectId);
if (empty($project) || $project->getArchived()) {