mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-24 00:03:42 +05:00
refactor(kiauh): reword print_info to print_status and implement new print_info method
Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
@@ -59,11 +59,13 @@ class RepoManager:
|
||||
|
||||
def clone_repo(self):
|
||||
log = f"Cloning repository from '{self.repo}' with method '{self.method}'"
|
||||
Logger.print_info(log)
|
||||
Logger.print_status(log)
|
||||
try:
|
||||
if os.path.exists(self.target_dir):
|
||||
if not get_confirm("Target directory already exists. Overwrite?"):
|
||||
Logger.print_info("Skipping re-clone of repository ...")
|
||||
if not get_confirm(
|
||||
"Target directory already exists. Overwrite?", default_choice=False
|
||||
):
|
||||
Logger.print_info("Skipping re-clone of repository.")
|
||||
return
|
||||
shutil.rmtree(self.target_dir)
|
||||
|
||||
@@ -78,7 +80,7 @@ class RepoManager:
|
||||
return
|
||||
|
||||
def pull_repo(self) -> None:
|
||||
Logger.print_info(f"Updating repository '{self.repo}' ...")
|
||||
Logger.print_status(f"Updating repository '{self.repo}' ...")
|
||||
try:
|
||||
self._pull()
|
||||
except subprocess.CalledProcessError:
|
||||
|
||||
Reference in New Issue
Block a user