Files
claude-sync/projects/-Users-csader/memory/feedback_no_sed_multiline.md
T
2026-06-26 09:54:16 -05:00

814 B

name, description, metadata
name description metadata
feedback-no-sed-multiline Never use sed for multi-line config edits — use Python or heredoc writes to avoid mangling YAML/config files
node_type type originSessionId
memory feedback d51db7ad-b5b8-40f4-b56a-9585fd13b303

Do not use sed -i for inserting multi-line blocks into config files (YAML, TOML, etc.). The newline handling breaks formatting and causes service outages.

Why: sed collapsed a multi-line OIDC client block into a single line, breaking Authelia's configuration.yml and causing a crash loop.

How to apply: For any config file edit that spans multiple lines, use Python (read/replace/write) or tee with a heredoc. Only use sed for single-line substitutions where the replacement fits on one line. Related: feedback-caddyfile-inode