Skip to content

Commit 9055ae1

Browse files
authored
If a solution exists but we want to remove it it should be deleted from the remote (#200)
1 parent 56448ed commit 9055ae1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ctfcli/core/challenge.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,9 @@ def sync(self, ignore: tuple[str] = ()) -> None:
919919
self._set_next(_next)
920920

921921
if "solution" not in ignore:
922-
# self._delete_existing_solution()
922+
resolved_solution = self._resolve_solution_path()
923+
if not resolved_solution:
924+
self._delete_existing_solution()
923925
self._create_solution()
924926

925927
make_challenge_visible = False

0 commit comments

Comments
 (0)