From 76e7799a3b0569bbddda4beee98fcd7cee49d096 Mon Sep 17 00:00:00 2001 From: Luis Medel Date: Fri, 20 Sep 2024 07:18:03 +0200 Subject: [PATCH] Don't mess with tokens/passwords. Let the user pick a proper git url --- src/bluish/commands/git.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bluish/commands/git.py b/src/bluish/commands/git.py index 67e061b..add0736 100644 --- a/src/bluish/commands/git.py +++ b/src/bluish/commands/git.py @@ -22,8 +22,12 @@ def prepare_environment(step: StepContext) -> ProcessResult: "git": "git", "openssh-client": "ssh", } - - required_packages = [package for package, binary in REQUIRED.items() if step.job.exec(f"which {binary}", step).failed] + + required_packages = [ + package + for package, binary in REQUIRED.items() + if step.job.exec(f"which {binary}", step).failed + ] if required_packages: info(f"Installing missing packages: {required_packages}...") result = install_package(step.job.runs_on_host, required_packages) @@ -64,7 +68,9 @@ def git_checkout(step: StepContext) -> ProcessResult: options += f" --branch {inputs['branch']}" info(f"Cloning repository: {safe_string(repository)}...") - clone_result = run_git_command(f"git clone {repository} {options} ./{repo_name}", step) + clone_result = run_git_command( + f"git clone {repository} {options} ./{repo_name}", step + ) if clone_result.failed: error(f"Failed to clone repository: {clone_result.error}") return clone_result