CLI: validate parent_dir and base_url with actionable errors #26
Loading…
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?
sub2pod does not validate its two key CLI inputs before use.
parent_dir: passing a path that does not exist or is not a directory surfaces as a crypticNotADirectoryErrordeep inside the directory walk, with no guidance about what went wrong.base_url: a malformed value (no scheme, wrong scheme, or garbage) is accepted silently and produces broken<enclosure>links in the generated feed, which the user only notices later in their podcast client.Plan of attack:
tests/test_cli.py:parent_dir→ clear, actionable errorparent_diris a file, not a directory → clear errorbase_urlwithouthttp:///https://scheme → clear errorsrc/sub2pod/cli.pyand raise/print actionable messages instead of letting the failure surface mid-walk.uv run tryke testuntil green.Decision taken (flag if you disagree):
base_urlis validated to require anhttp://orhttps://scheme. Relative-URL support is out of scope unless you want it — that was the fork in the improvements.md task.