{"record":{"id":"486ac6ba8e68a05e","repo":"jdx/mise","slug":"agent-name-queue-directories-must-not-contai","errorCode":null,"errorMessage":"agent '{name}' `queue_directories` must not contain empty entries","messagePattern":"agent '(.+?)' `queue_directories` must not contain empty entries","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/launchd.rs","lineNumber":131,"sourceCode":"        }\n        let Some(program) = config.program.map(|s| s.trim().to_string()) else {\n            bail!(\"agent '{name}' must set `program`\");\n        };\n        if program.is_empty() {\n            bail!(\"agent '{name}' must set a non-empty `program`\");\n        }\n        if config.keep_alive && config.keep_alive_on_failure {\n            bail!(\"agent '{name}' cannot set both `keep_alive` and `keep_alive_on_failure`\");\n        }\n        if config.nice.is_some_and(|nice| !(-20..=20).contains(&nice)) {\n            bail!(\"agent '{name}' `nice` must be between -20 and 20\");\n        }\n        if let Some(interval) = &config.start_calendar_interval {\n            interval.validate(&name)?;\n        }\n        for dir in &config.queue_directories {\n            if dir.trim().is_empty() {\n                bail!(\"agent '{name}' `queue_directories` must not contain empty entries\");\n            }\n            // checked against the raw string rather than `Path::is_absolute` on the\n            // expanded value: the plist is consumed by macOS launchd, so POSIX rules\n            // apply regardless of the platform parsing the config, and on Windows\n            // `Path::new(\"/var/spool\").is_absolute()` is false (root, but no prefix)\n            if !is_absolute_launchd_path(dir) {\n                bail!(\n                    \"agent '{name}' `queue_directories` entry '{dir}' must be an absolute path \\\n                     (launchd requires absolute paths; `~` and `~/` are expanded)\"\n                );\n            }\n        }\n        Ok(Self {\n            label: format!(\"dev.mise.{name}\"),\n            name,\n            program,\n            args: config.args,\n            run_at_load: config.run_at_load,","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/launchd.rs#L113-L149","documentation":"LaunchdRequest::from_toml iterates the agent's queue_directories list and rejects any entry that is empty or whitespace-only after trimming. Empty entries would produce an invalid WatchPaths entry in the generated plist. The check applies to the raw string, independent of platform path rules.","triggerScenarios":"queue_directories = [\"/var/spool/mail\", \"\"] or [\" \"] — an array containing an empty or whitespace-only element.","commonSituations":"Trailing commas or placeholder slots left in the directory list; template expansion producing empty strings; hand-editing the array and leaving a blank entry.","solutions":["Remove empty or whitespace-only entries from queue_directories","Ensure each entry is a real absolute directory path","If building the list programmatically, filter out empty strings before writing config"],"exampleFix":"# before\nqueue_directories = [\"/var/spool/mail\", \"\"]\n# after\nqueue_directories = [\"/var/spool/mail\"]","handlingStrategy":"validation","validationCode":"dirs = agent_cfg.get(\"queue_directories\", [])\nassert all(d.strip() for d in dirs), \"queue_directories contains an empty entry\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Filter empty strings when building directory lists programmatically","Avoid trailing blank entries when hand-editing arrays","Validate TOML arrays before deploying"],"tags":["launchd","config","validation"],"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"}