Skip to content

cook seed silently swallows per-file write failures and exits 0 #707

Closed

Description

@drawmeanelephant

Suggested labels: bug, area: cli


Discovery audit finding M10 (medium) — cooklang/cookcli @ 7c2f48b (v0.38.1), audited 2026-10-12. Repro verified.

Summary

cook seed silently swallows per-file write failures and exits 0.

Where

src/seed.rs:41-48 — the fs::write(...) io::Result is discarded inside .map().

Repro

$ mkdir Risotto.cook        # a directory where a seed file belongs
$ cook seed .
(exit 0, no message; Risotto.cook is missing)

Expected

The failed file is reported and the command exits nonzero.

Actual

Silent success; the seed file is missing.

Acceptance criteria (red → green)

  • Red: the repro exits 0 with no output and no Risotto.cook file.
  • Green: the repro reports the failed file and exits nonzero.

Verification

Executed repro.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions