{"record":{"id":"986394994526657d","repo":"jdx/mise","slug":"check-command-must-not-be-empty","errorCode":null,"errorMessage":"Check command must not be empty","messagePattern":"Check command must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/doctor/project.rs","lineNumber":226,"sourceCode":"                }\n            })\n            // Unordered so a slow probe does not hold back admission of the\n            // remaining checks; the report is sorted by name afterwards.\n            .buffer_unordered(crate::jobs::normalize(Settings::get().jobs))\n            .collect()\n            .await;\n        report.checks.sort_by(|a, b| a.name.cmp(&b.name));\n        Ok(report)\n    }\n}\n\nasync fn run_check(\n    check: &DoctorCheck,\n    root: &Path,\n    environment: &EnvMap,\n) -> Result<std::process::Output> {\n    if check.run.trim().is_empty() {\n        bail!(\"Check command must not be empty\");\n    }\n    let timeout = check\n        .timeout\n        .as_deref()\n        .map(crate::duration::parse_duration)\n        .transpose()?\n        .unwrap_or(Duration::from_secs(10));\n    if timeout.is_zero() {\n        bail!(\"Check timeout must be greater than zero\");\n    }\n    let mut shell = match &check.shell {\n        Some(shell) => crate::path::split_shell_command(shell)?,\n        None => Settings::get().default_inline_shell()?,\n    };\n    Settings::get().maybe_no_profile(&mut shell);\n    let Some((program, args)) = shell\n        .split_first()\n        .filter(|(program, _)| !program.trim().is_empty())","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/doctor/project.rs#L208-L244","documentation":"Doctor project checks defined in project configuration must supply a non-empty `run` command. When a check's `run` field is missing, blank, or only whitespace, mise's doctor refuses to execute it and bails with this error, since running an empty shell command is meaningless.","triggerScenarios":"A `mise doctor` project check where `check.run.trim().is_empty()` — i.e. the check entry has `run = \"\"`, `run = \"   \"`, or omits `run` entirely while still being executed by run_check (called from check).","commonSituations":"Hand-editing doctor check config and leaving a placeholder empty `run`; templated config where a variable meant to hold the command expanded to empty; copy-pasting a check entry and forgetting to fill in the command.","solutions":["Set a non-empty `run` command on the offending check in the project's mise/doctor configuration.","Remove the empty check entry entirely if it is not needed.","If the command comes from a template/variable, ensure that variable is defined and non-empty at render time."],"exampleFix":"// before (mise.toml)\n[[doctor.checks]]\nname = \"lint\"\nrun = \"\"\n\n// after\n[[doctor.checks]]\nname = \"lint\"\nrun = \"npm run lint\"","handlingStrategy":"validation","validationCode":"// validate doctor check config before running mise doctor\nfor check in checks {\n    if check.run.trim().is_empty() {\n        panic!(\"doctor check '{}' has an empty run command\", check.name);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always fill in `run` when adding a doctor check entry.","Lint project config for empty strings in required fields.","Remove placeholder checks instead of committing them empty."],"tags":["doctor","config","validation","cli"],"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"}