Unable to install challenges with the same name (but different category)
- Dominant language
- Python
- Stars
- 215
- Forks
- 95
- Avg merge
- 2h 17m
- Merged PRs (30d)
- 1
Description
The function `install()` in `ctfcli/cli/challenge.py` implements a check to see if there is already a challenge with the same name. This check does this as follows:
```python
if c["name"] == challenge["name"]:
click.secho(
"Already found existing challenge with same name. Perhaps you meant sync instead of install?",
fg="red",
)
```
As a result, `ctfcli` refuses to install challenges with the same name regardless of the category.
I have been using a modified variant of `ctfcli` that determines if a challenge is already present based on the challenge name and challenge category.
```python
if c["name"] == challenge["name"] and c["category"] == challenge["category"]:
click.secho(
"Already found existing challenge with same name. Perhaps you meant sync instead of install?",
fg="red",
)
```
The same check is also present in the function `sync_challenge()` in `ctfcli/utils/challenge.py` and should be changed in similar fashion to sync the correct challenge.
I guess this is the intended/expected behaviour?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.