From a26837ae0cc6bff8b1ea055c69e96d49b85acee9 Mon Sep 17 00:00:00 2001 From: Chandler Newby Date: Thu, 6 Nov 2025 17:08:54 -0700 Subject: [PATCH 1/3] Can't compare relative paths to absolute paths --- ctfcli/cli/challenges.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctfcli/cli/challenges.py b/ctfcli/cli/challenges.py index 70fe113..6885e23 100644 --- a/ctfcli/cli/challenges.py +++ b/ctfcli/cli/challenges.py @@ -673,7 +673,7 @@ def sync(self, challenge: str = None, ignore: Union[str, Tuple[str]] = ()) -> in click.secho( f"Syncing '{challenge_name}' (" - f"{challenge_instance.challenge_file_path.relative_to(config.project_path)}" + f"{challenge_instance.challenge_file_path.absolute().relative_to(config.project_path)}" f") ...", fg="blue", ) @@ -748,7 +748,7 @@ def deploy( click.secho( f"Deploying challenge service '{challenge_name}' " - f"({challenge_instance.challenge_file_path.relative_to(config.project_path)}) " + f"({challenge_instance.challenge_file_path.absolute().relative_to(config.project_path)}) " f"with {deployment_handler.__class__.__name__} ...", fg="blue", ) From 6b2ae0b402836072bad9419a7cea6b756293c5e3 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Mon, 10 Nov 2025 04:26:35 -0500 Subject: [PATCH 2/3] Use full challenge_file_path --- ctfcli/cli/challenges.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ctfcli/cli/challenges.py b/ctfcli/cli/challenges.py index 6885e23..f340cff 100644 --- a/ctfcli/cli/challenges.py +++ b/ctfcli/cli/challenges.py @@ -672,9 +672,7 @@ def sync(self, challenge: str = None, ignore: Union[str, Tuple[str]] = ()) -> in continue click.secho( - f"Syncing '{challenge_name}' (" - f"{challenge_instance.challenge_file_path.absolute().relative_to(config.project_path)}" - f") ...", + f"Syncing '{challenge_name}' (" f"{challenge_instance.challenge_file_path}" ") ...", fg="blue", ) try: @@ -748,7 +746,7 @@ def deploy( click.secho( f"Deploying challenge service '{challenge_name}' " - f"({challenge_instance.challenge_file_path.absolute().relative_to(config.project_path)}) " + f"({challenge_instance.challenge_file_path}) " f"with {deployment_handler.__class__.__name__} ...", fg="blue", ) @@ -816,7 +814,7 @@ def deploy( click.secho("Success!\n", fg="green") if len(skipped_deployments) > 0: - click.secho("Deployment skipped (no image specified) for:",fg="yellow") + click.secho("Deployment skipped (no image specified) for:", fg="yellow") for challenge_instance in skipped_deployments: click.echo(f" - {challenge_instance}") From 92ee27cbf297ae43e0a964bc72c2058054913ee9 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Mon, 10 Nov 2025 04:28:32 -0500 Subject: [PATCH 3/3] Fix lint --- ctfcli/cli/challenges.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctfcli/cli/challenges.py b/ctfcli/cli/challenges.py index f340cff..fda5ebe 100644 --- a/ctfcli/cli/challenges.py +++ b/ctfcli/cli/challenges.py @@ -653,7 +653,7 @@ def sync(self, challenge: str = None, ignore: Union[str, Tuple[str]] = ()) -> in if isinstance(ignore, str): ignore = (ignore,) - config = Config() + _config = Config() remote_challenges = Challenge.load_installed_challenges() failed_syncs = [] @@ -718,7 +718,7 @@ def deploy( else: skipped_deployments.append(challenge_instance) - config = Config() + _config = Config() with click.progressbar(deployable_challenges, label="Deploying challenges") as challenges: for challenge_instance in challenges: click.echo()