protected function getAddon()
    {
        if ($addon = $this->option('addon')) {
            $env = app(AddonEnvironment::class);

            if (!$env->exists($addon)) {
                throw new UnexpectedValueException("Addon '$addon' is not found.");
            }

            return $env->addon($addon);
        } else {
            return;
        }
    }