Skip to content

Commit

Permalink
Merge pull request #45 from pact-foundation/fix/issue-16
Browse files Browse the repository at this point in the history
fix(cli): --skip-if-installed always skipped
  • Loading branch information
rholshausen authored Oct 4, 2023
2 parents b1d5576 + 20a925c commit 1220875
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 1220875

Please sign in to comment.