Skip to content

fix(writers): a directory at a template destination crashes every writer with a raw EISDIR, dry-runs included #1124

Closed

Description

@admarble

Found by the writer-state matrix in #1097.

What happens

When a directory sits where a template file goes, the writers reject with a raw EISDIR (or EEXIST) error and no message. The directory is left intact, but the command aborts partway through, so what was written before the failure stays and the rest is skipped, including the version marker and manifest.

Affected, for a directory at the destination:

  • .claude/settings.json, .claude/skills/spec/SKILL.md, .claude/memory/constitution.md: every writer, including sync --dry-run and update --dry-run (computeTemplateChanges reads the path as a file)
  • .sequant/settings.json, .mcp.json, .gitignore: init and init --force
  • scripts/dev/<x>.sh: init --force, sync, update (and EEXIST from symlinkDir on the link route)

A dry-run that crashes is the worst of these: the preview is what a user runs to find out whether something is wrong.

Expected

A named, actionable error per destination (<path> is a directory; move it aside) or a documented skip, and a dry-run that reports the collision instead of throwing.

The matrix pins the current behaviour (letter X) and lists it under KNOWN_DEFECTS.

Activity

  1. admarble commented on Sep 24, 2026

    @admarble
    ContributorAuthor

    Folded into #1122: same writer-state matrix, same writer code paths, one hardening PR covers the symlink (W) and directory (X) cells together.

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