public function downloaded($name)
    {
        if ($this->local($name)) {
            return $this->filesystem->isDirectory(base_path("hooks/{$name}"))
                && $this->filesystem->exists(base_path("hooks/{$name}/composer.json"));
        }

        return $this->filesystem->isDirectory(base_path("vendor/{$name}"));
    }