{"record":{"id":"0ed942ecf185ca2e","repo":"jdx/mise","slug":"a-glob-is-required","errorCode":null,"errorMessage":"a glob is required","messagePattern":"a glob is required","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/paths.rs","lineNumber":179,"sourceCode":"                crate::system::history::watch::runtime::humantime(std::time::Duration::from_secs(\n                    noisy.interval_secs,\n                )),\n                noisy.pending_changes.to_string(),\n                noisy.last_seen.clone(),\n            ]);\n        }\n        table.print()?;\n        miseprintln!(\n            \"These paths keep changing, so the watcher saves them ever more rarely (never excluded or switched to manual saving on its own). Exclude a log, cache, or database with `mise dot exclude '<glob>'`; track configuration that changes constantly with `--no-autosave` and save it explicitly.\"\n        );\n        Ok(())\n    }\n}\n\npub(crate) fn edit_exclude(glob: &str, add: bool) -> Result<()> {\n    let glob = glob.trim();\n    if glob.is_empty() {\n        eyre::bail!(\"a glob is required\");\n    }\n    let global = crate::config::global_config_path();\n    let changed = crate::cli::dotfiles::track::edit_exclude(glob, add)?;\n    match (add, changed) {\n        (true, true) => info!(\n            \"history: {glob} is excluded from capture ({})\",\n            display_path(&global)\n        ),\n        (true, false) => info!(\"history: {glob} was already excluded\"),\n        (false, true) => info!(\n            \"history: {glob} is captured again ({})\",\n            display_path(&global)\n        ),\n        (false, false) => info!(\"history: {glob} was not excluded\"),\n    }\n    Ok(())\n}\n","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/dotfiles/paths.rs#L161-L197","documentation":"Validation in the `mise dotfiles` paths command (edit_exclude flow, src/cli/dotfiles/paths.rs). The `mise dot exclude` command requires a glob pattern argument to add to the exclusion list; this error fires when the subcommand is invoked with no glob (or an empty argument), so there is no pattern to persist to the dotfiles watch configuration.","triggerScenarios":"Calling `mise dot paths exclude` / `--add` with an empty string or only whitespace as the glob argument (after `glob.trim()` it is empty).","commonSituations":"Shell scripts with an unquoted/unset variable: `mise dot paths exclude $GLOB` where GLOB is empty; accidental double-space or missing argument in an alias.","solutions":["Pass the glob explicitly: `mise dot paths exclude 'secrets/*'`","Quote the argument in scripts: `mise dot paths exclude \"$GLOB\"` and validate $GLOB is non-empty first","Use `mise dot paths` to list current exclusions and confirm the pattern you want"],"exampleFix":"// before\nGLOB=\"\"\nmise dot paths exclude $GLOB\n// after\nGLOB=\"secrets/*\"\nmise dot paths exclude \"$GLOB\"","handlingStrategy":"validation","validationCode":"[ -n \"${GLOB:-}\" ] && [ -n \"$(echo \"$GLOB\" | tr -d '[:space:]')\" ] || { echo \"glob required\"; exit 1; }","typeGuard":null,"tryCatchPattern":"if ! mise dot paths exclude \"$GLOB\"; then\n  echo \"provide a non-empty glob, e.g. mise dot paths exclude 'secrets/*'\"\nfi","preventionTips":["Quote glob variables in shell scripts","Default empty variables before invoking the command","Validate globs non-empty after trimming whitespace","List current exclusions (`mise dot paths`) to sanity-check patterns"],"tags":["cli","dotfiles","glob","empty-argument"],"backgroundTag":"empty-required-field","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}