Skip to content

The fetch CLI fails when its destination or a nested filename parent is missing #9

Description

@DivyamTalwar

Reproduction and expected behavior

The normal CLI dispatch calls fetch.run without creating dest, unlike the standalone module entry point. open(part) fails for a new destination or a nested remote filename. Create the output parent before HTTP/writing, retaining ordinary errors when a file blocks that directory.

Base: 252e5193902d466726da9af75047dfffff2ae662. The attached PR adds regressions against the actual package/service modules, then applies the correction. Running those final regression files against unchanged production produces:

4 failed, 2 passed in 0.15s

Focused command after placing the regressions in the checkout:

python -m pytest -q tests/test_fetch_destinations.py

Scope

The change repairs fetch and its actual CLI dispatch, not auto's separate basename bookkeeping after nested downloads. Path interpretation is unchanged; no path-containment guarantee is introduced. Failed attempts may leave empty directories.

Synthetic test input only; no reported live outage, security incident, hardware-performance measurement, or P0/P1 label.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions