Skip to content

Commit

Permalink
Unlint
Browse files Browse the repository at this point in the history
  • Loading branch information
rithvikru committed Aug 9, 2024
1 parent 627c471 commit 6ec407d
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/cmd/install.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{Context, Result};
use std::path::PathBuf;
use std::process::Command;
use std::path::PathBuf;

use crate::cmd::{Execute, Install};

Expand All @@ -22,21 +22,12 @@ fn install_from_url(url: &String, location: &str) -> Result<()> {
let repo_path = PathBuf::from(location).join(
url.rsplit('/')
.find(|segment| !segment.is_empty())
.unwrap_or_default(),
.unwrap_or_default()
);

dbg!(url.split('/').last().unwrap_or_default());
Command::new("git")
.args([
"clone",
"--depth",
"1",
"--single-branch",
"--jobs",
"4",
url,
repo_path.to_str().unwrap_or_default(),
])
.args(["clone", "--depth", "1", "--single-branch", "--jobs", "4", url, repo_path.to_str().unwrap_or_default()])
.status()
.with_context(|| format!("Failed to clone repository from URL: '{}'", url))?;

Expand Down

0 comments on commit 6ec407d

Please sign in to comment.