jdx/mise · error

unknown trigger {other:?}; use save, agent, or update

Error message

unknown trigger {other:?}; use save, agent, or update

What it means

Thrown by the dotfiles `save` command when the --trigger argument string is not one of the three supported trigger names: save, agent, or update. The trigger is matched exactly before any history work starts.

Source

Thrown at src/cli/dotfiles/save.rs:70

        tracked: &crate::system::history::tracked::TrackedSet,
        draft: Draft,
    ) -> Result<()> {
        match self.capture(store, tracked, draft) {
            Ok(()) => Ok(()),
            Err(err) if self.best_effort => {
                warn!("history save: {err:#}");
                Ok(())
            }
            Err(err) => Err(err),
        }
    }

    async fn save(self) -> Result<()> {
        let trigger = match self.trigger.as_str() {
            "save" => Trigger::Save,
            "agent" => Trigger::Agent,
            "update" => Trigger::Update,
            other => bail!("unknown trigger {other:?}; use save, agent, or update"),
        };
        if !crate::config::Settings::get().history.enabled {
            bail!("history is disabled (history.enabled = false)");
        }
        let (store, tracked, entries) = super::history::open().await?;
        if !self.paths.is_empty() {
            let walk = tracked.walk()?;
            for path in &self.paths {
                let path = normalize_target(path);
                let captured = walk.files.keys().any(|file| file.starts_with(&path));
                if !captured {
                    // saving a deleted manual-save path saves the deletion,
                    // provided the path was captured before (a path that
                    // never existed is not a deletion)
                    let deletion = tracked
                        .entry_for(&path)
                        .is_some_and(|entry| !entry.policy.autosave)
                        && std::fs::symlink_metadata(&path)

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Use one of: `--trigger save`, `--trigger agent`, or `--trigger update`
  2. Check the variable interpolated into --trigger for typos or casing
  3. Check `mise bootstrap dotfiles save --help` for the accepted trigger values

Example fix

// before
mise bootstrap dotfiles save --trigger autosave
// after
mise bootstrap dotfiles save --trigger save
Defensive patterns

Strategy: validation

Validate before calling

case "$TRIGGER" in
  save|agent|update) ;;
  *) echo "invalid trigger: $TRIGGER (use save, agent, or update)" >&2; exit 1 ;;
esac
mise bootstrap dotfiles save --trigger "$TRIGGER"

Prevention

When it happens

Trigger: Running `mise bootstrap dotfiles save --trigger <value>` with any string other than "save", "agent", or "update" (exact, lowercase match).

Common situations: Typos like --trigger Save or --trigger autosave; shell variables containing the wrong value; outdated scripts using a trigger name from an older version.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/9f204b04438334e3. Report an issue: GitHub.