fix(cli): retain saved rig specs after failed export writes (#640)
A failed rig export write could replace the saved rig.yaml with partial output. Export now uses the config store's existing staged write, moved into one shared helper: complete content is written beside the target and renamed into place, so a failed data write leaves the previous file intact and removes the staged copy. File modes, POSIX ownership, symlink following and the fallback for unwritable directories or busy targets are kept, and write-only destinations are accepted. A destination that already exists and is not a regular file, such as a pipe behind /dev/stdout, a FIFO or a device, is written directly as before, so streams and devices are never replaced. The config store keeps the same behavior through the shared helper. Tests cover partial-write failure through the real export command, FIFO and stream destinations, symlinks and long file names. No ACL preservation or power-loss durability is claimed. Contributed by @rudycelekli.
R
Rudy Mizrahi Celekli committed
7748b87d43692a008d7ab3ee2f5d835e23efd7ae
Parent: 20b3b48
Committed by GitHub <noreply@github.com>
on 10/3/2026, 8:59:45 PM