mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
Before every command, the root command's PersistentPreRun runs state.MakePrivate: it makes the data folder ($XDG_DATA_HOME/devvm) and the settings folder ($XDG_CONFIG_HOME/devvm) when they're missing and sets both to mode 700, whatever mode they had, so a wider mode on anything beneath them opens nothing to others. When it can't, devvm warns (folders_not_private, linked to what devvm keeps) and goes on; without an absolute HOME there are no folders, and the command says so itself. The per-folder 700s (exports, logs, run logs, run, CA, secrets) stay as they are. Tests: state's TestMakePrivate (made, made private from 777, a folder inside keeps its mode, one that can't be made fails) and folders_private.txtar (modes after a run, the warning's fields). Docs: using/space.md's data folder, using/settings.md's state and internals/overview.md's state section. Co-Authored-By: Claude Opus 5.5 <[email protected]>