Skip to content

Commit

Permalink
feat: Updated fluere-plugin/src/downloader.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Nov 8, 2023
1 parent 6c3f184 commit 6920a24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fluere-plugin/src/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::process::Command;

pub fn download_plugin_from_github(repo_name: &str) -> Result<(), std::io::Error> {
let url = format!("https://github.com/{}.git", repo_name);
let path = home_cache_path()?;
let path = home_cache_path().unwrap();
if !path.exists() {
std::fs::create_dir_all(path.clone())?;
}
let repo_path = path?.join(repo_name.split('/').last().unwrap());
let repo_path = path.join(repo_name.split('/').last().unwrap());
if repo_path.exists() {
Command::new("git")
.args(&["fetch", "pull"])
Expand All @@ -16,7 +16,7 @@ pub fn download_plugin_from_github(repo_name: &str) -> Result<(), std::io::Error
} else {
Command::new("git")
.args(&["clone", &url])
.current_dir(&path?)
.current_dir(&path)
.output()?;
}
Ok(())
Expand Down

0 comments on commit 6920a24

Please sign in to comment.