Skip to content

Commit

Permalink
fix: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Feb 24, 2021
1 parent 150ddbc commit 87474e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/infrastructure/git/git_repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ impl GitRepository {
};

let _ = fs::create_dir_all(&local_path.parent().unwrap());
let repo = match Repository::clone(url, local_path) {
let repo = match Repository::clone(url, &local_path) {
Ok(repo) => repo,
Err(e) => {
let exist_string = "exists and is not an empty directory";

if e.to_string().contains(exist_string) {
return match Repository::open(&local_path) {
return match Repository::open(local_path) {
Ok(repo) => repo,
Err(e) => panic!("failed to open: {}", e),
};
Expand Down

0 comments on commit 87474e8

Please sign in to comment.