Skip to content

Commit

Permalink
fix(cli): --skip-if-installed always skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Oct 3, 2023
1 parent b1d5576 commit 20a925c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ pub(crate) async fn fetch_json_from_url(source: &str, http_client: &Client) -> a
}

fn already_installed(manifest: &PactPluginManifest) -> bool {
find_plugin(&manifest.name, &Some(manifest.version.clone())).is_ok()
if let Ok(res) = find_plugin(&manifest.name, &Some(manifest.version.clone())) {
return res.len() > 0
}

return false
}

fn create_plugin_dir(manifest: &PactPluginManifest, override_prompt: bool) -> anyhow::Result<PathBuf> {
Expand Down

0 comments on commit 20a925c

Please sign in to comment.