jdx/mise · error
has unsaved directory permission changes; save them before…
Error message
{} has unsaved directory permission changes; save them before pulling. Sharing is paused What it means
Before pulling, the directories planner compares the directory's live permission bits with the last-saved permissions recorded for it. If the directory is tracked in history as a directory (mode 040000) and the live mode differs from the saved one, there are unsaved local permission changes that a pull would silently overwrite — so mise refuses and pauses sharing for that path. Users must persist (commit/push) their permission change first.
Solutions
- Save your permission change first (e.g. commit/push the mode via your sync workflow) so history reflects it, then pull.
- Or discard the local chmod to match the saved permissions: `chmod <saved-mode> <path>`, then retry the pull.
- Re-run `mise dot sync` after reconciling; the pause is per-path and clears once modes agree.
- Check with `stat -c '%a' <path>` versus the saved permissions to see exactly what diverged.
Example fix
// before $ chmod 700 ~/.config/private # unsaved $ mise dot sync error: ~/.config/private has unsaved directory permission changes; save them before pulling... // after $ chmod 755 ~/.config/private # or save/push your change first $ mise dot sync
Defensive patterns
Strategy: validation
Validate before calling
# compare live mode against last-saved permissions before pulling stat -c '%a' ~/.config/private # must match the saved mode in history, else save or revert first
Prevention
- Always commit/push chmod changes to shared directories before pulling.
- Avoid ad-hoc chmods on synced directories.
- Watch umask differences when restoring from clones — normalize modes before syncing.
When it happens
Trigger: `plan` in directories.rs sees `was_directory` true and `before` (live dev/ino/mode bits) != Some(saved.permissions... or default 0o755): the directory's current mode differs from what was last saved in history at pull time.
Common situations: You chmod'ed a shared dotfiles directory locally but haven't pushed; a teammate changed permissions remotely and your local chmod conflicts; a fresh clone applied different umask so modes diverge from saved values.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- cannot check staged changes in
- cannot replace local history while
- changed after permission planning; retry pull
- changed during application; left untouched
- choose only one resolution for
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/4b3b914d3a900e3e.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/history/sync/directories.rs:82
let path = roots.locate(portable).path().unwrap().to_path_buf();
let before = observe(&path)?;
let desired = tracked
.manifest
.permissions
.get(portable)
.copied()
.unwrap_or(0o755);
let was_directory = local
.as_deref()
.map(|head| repo.object_at(head, portable))
.transpose()?
.flatten()
.is_some_and(|(mode, _)| mode == "040000");
if was_directory
&& before.map(|(_, _, bits)| bits)
!= Some(saved.permissions.get(portable).copied().unwrap_or(0o755))
{
bail!(
"{} has unsaved directory permission changes; save them before pulling. Sharing is paused",
crate::file::display_path(&path)
);
}
if before.map(|(_, _, bits)| bits) != Some(desired) {
steps.push(Step {
path,
before,
desired,
written: None,
});
}
}
steps.sort_by_key(|step| step.path.components().count());
Ok(steps)
}
impl Step {View on GitHub (pinned to 533346cc37)