format.write_failed
A file jadpo fmt formatted couldn't be written, usually because it is read-only.
Area 14, Tools; not declinable; the next step is usually the human's.
Why Jadpo refuses it
jadpo fmt lays out each .jadpo file the one way Jadpo writes it, and
writes back the files that change. When the operating system refuses
one, it says which file and why, leaves that file as it was, and still
formats the others. It exits with a failure, so a script or an agent
doesn't take the project for formatted.
Jadpo won't change the file's permissions for you: a read-only file may be read-only on purpose, and who may write it is a decision about your machine, not about the app.
What it looks like
A project's config.jadpo is indented with two spaces, and the file is
read-only:
cat > config.jadpo <<'EOF'config { /// How many todos a page shows. page_size: Int { default: 20 }}EOFchmod a-w config.jadpojadpo fmt
error config.jadpo couldn't be written
--> config.jadpo
- reason
- Writing the formatted file failed: Permission denied (os error 13).
- next
- Check the file can be written, then run
jadpo fmtagain (human) - rule
- format.
write_ failed - help
- https://jadpo.
dev/docs/errors/format. write_ failed
(human) at the end of the next: line tells your coding agent to stop
and ask you which fix you want, because the choice is yours to make: it
decides who may write the project's files.
How to fix it
If the file should be writable, let yourself write to it, then format again:
chmod u+w config.jadpojadpo fmt
The file is written in the canonical layout, with four spaces for each
level, and jadpo fmt exits 0.
Related
Markdown for agents: /docs/errors/format.write_failed.md.Built from Jadpo main at aee2e8f.