{"record":{"id":"1186100ffc6a96ad","repo":"jdx/mise","slug":"user-service-name-must-set-a-non-empty-comman","errorCode":null,"errorMessage":"user service '{name}' must set a non-empty `command`","messagePattern":"user service '(.+?)' must set a non-empty `command`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/user_services.rs","lineNumber":131,"sourceCode":"                    Some(exe) => Some(\n                        std::iter::once(quote_program(&exe.to_string_lossy()))\n                            .chain(definition.args.iter().map(|arg| arg.to_string()))\n                            .collect::<Vec<_>>()\n                            .join(\" \"),\n                    ),\n                    None => {\n                        unresolved = Some(\n                            \"no durable mise executable; install mise on this host first\"\n                                .to_string(),\n                        );\n                        None\n                    }\n                }\n            }\n            (None, Some(command)) => {\n                let command = command.trim();\n                if command.is_empty() {\n                    bail!(\"user service '{name}' must set a non-empty `command`\");\n                }\n                Some(command.to_string())\n            }\n        };\n        Ok(Self {\n            name,\n            description,\n            command,\n            unresolved,\n            builtin: config.builtin,\n            restart: restart.unwrap_or_default(),\n            nice,\n            environment: config.environment,\n            working_directory: config.working_directory,\n            requires_tools: config.requires_tools,\n            state: config.state,\n            enabled: config.enabled,\n            origin,","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/user_services.rs#L113-L149","documentation":"A user service with a custom `command` must supply non-empty text. The command is trimmed and, if empty (e.g. `\"\"` or whitespace), parsing fails because an empty command would produce a unit that does nothing.","triggerScenarios":"`command = \"\"` or `command = \"   \"` on a user service entry, hitting the `(None, Some(command))` arm's empty check at src/system/user_services.rs:131.","commonSituations":"Leaving a placeholder empty string in config; templating that expands to an empty value; clearing a command while keeping the entry.","solutions":["Set `command` to the actual command line to run","Remove the entry if no command is needed","Interpolate a non-empty value if using templated config"],"exampleFix":"// before\n[[bootstrap.linux.user_services]]\nname = \"my-agent\"\ncommand = \"\"\n\n// after\n[[bootstrap.linux.user_services]]\nname = \"my-agent\"\ncommand = \"my-agent --daemon\"","handlingStrategy":"validation","validationCode":"fn validate_command(s: &UserServiceConfig) -> Result<(), String> {\n    if let Some(c) = &s.command {\n        if c.trim().is_empty() {\n            return Err(format!(\"user service '{}': command must be non-empty\", s.name));\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never leave `command = \"\"` placeholders in committed config","Verify templated command values expand to non-empty strings"],"tags":["config","validation","empty-value","user-services"],"backgroundTag":"empty-required-field","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}