Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
fix: 🐛 remove duplicated loading animations
Browse files Browse the repository at this point in the history
  • Loading branch information
M1n-74316D65 committed Aug 13, 2024
1 parent 44cd794 commit 64f44f1
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,13 @@ use std::fs;
use std::path::Path;

pub fn clone(url: &str, force: bool) -> Result<(), Box<dyn std::error::Error>> {
let loading = utils::LoadingAnimation::new();
loading.start("Cloning repository...");

let result = git::clone(url, utils::folder_path().as_str(), force);
loading.stop();

match result {
Ok(_) => {
println!("Repo cloned successfully");

let loading = utils::LoadingAnimation::new();
loading.start("Copying files to home directory...");

let copy_result = utils::copy_files_to_home();
loading.stop();

match copy_result {
Ok(_) => println!("Files copied to home directory successfully"),
Expand All @@ -36,21 +28,13 @@ pub fn clone(url: &str, force: bool) -> Result<(), Box<dyn std::error::Error>> {
}

pub fn clone_ssh(url: &str, force: bool) -> Result<(), Box<dyn std::error::Error>> {
let loading = utils::LoadingAnimation::new();
loading.start("Cloning repository via SSH...");

let result = git::clone_ssh(url, utils::folder_path().as_str(), force);
loading.stop();

match result {
Ok(_) => {
println!("Repo cloned successfully");

let loading = utils::LoadingAnimation::new();
loading.start("Copying files to home directory...");

let copy_result = utils::copy_files_to_home();
loading.stop();

match copy_result {
Ok(_) => println!("Files copied to home directory successfully"),
Expand Down

0 comments on commit 64f44f1

Please sign in to comment.