protected function getEnvironmentOption()
{
$definition = new InputDefinition();
$definition->addOption(new InputOption('environment', null, InputOption::VALUE_REQUIRED));
$input = new Console\GlobalArgvInput(null, $definition);
return $input->getOption('environment') ?: getenv('CRAFT_ENVIRONMENT');
}