From 20a925cf879f7042044a3762cdd034c0c4fc6d7e Mon Sep 17 00:00:00 2001 From: Matt Fellows <53900+mefellows@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:18:13 +1100 Subject: [PATCH] fix(cli): --skip-if-installed always skipped --- cli/src/install.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/src/install.rs b/cli/src/install.rs index 3fd807d9..3c3df48d 100644 --- a/cli/src/install.rs +++ b/cli/src/install.rs @@ -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 {