warn when :CP <platform> <contest> is run for a disabled platform #326
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/cp.nvim#326
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Running `:CP codeforces 1234` when `codeforces` is not listed in `enabled_platforms` (or the platform key is absent from `config.platforms`) silently does nothing or produces a confusing internal error. There is no user-facing warning.
Solution
Before initiating a fetch in `setup.setup_contest`, check that the platform is present and enabled in the config. If not, emit a clear `vim.log.levels.ERROR` notification: e.g. `"Platform 'X' is not enabled. Add it to platforms in your cp.nvim config."`
Resolved by #336.