jdx/mise · error
user service '{name}' must set a non-empty `command`
Error message
user service '{name}' must set a non-empty `command` What it means
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.
Source
Thrown at src/system/user_services.rs:131
Some(exe) => Some(
std::iter::once(quote_program(&exe.to_string_lossy()))
.chain(definition.args.iter().map(|arg| arg.to_string()))
.collect::<Vec<_>>()
.join(" "),
),
None => {
unresolved = Some(
"no durable mise executable; install mise on this host first"
.to_string(),
);
None
}
}
}
(None, Some(command)) => {
let command = command.trim();
if command.is_empty() {
bail!("user service '{name}' must set a non-empty `command`");
}
Some(command.to_string())
}
};
Ok(Self {
name,
description,
command,
unresolved,
builtin: config.builtin,
restart: restart.unwrap_or_default(),
nice,
environment: config.environment,
working_directory: config.working_directory,
requires_tools: config.requires_tools,
state: config.state,
enabled: config.enabled,
origin,View on GitHub (pinned to afd2eddd3a)
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
Example fix
// before [[bootstrap.linux.user_services]] name = "my-agent" command = "" // after [[bootstrap.linux.user_services]] name = "my-agent" command = "my-agent --daemon"
Defensive patterns
Strategy: validation
Validate before calling
fn validate_command(s: &UserServiceConfig) -> Result<(), String> {
if let Some(c) = &s.command {
if c.trim().is_empty() {
return Err(format!("user service '{}': command must be non-empty", s.name));
}
}
Ok(())
} Prevention
- Never leave `command = ""` placeholders in committed config
- Verify templated command values expand to non-empty strings
When it happens
Trigger: `command = ""` or `command = " "` on a user service entry, hitting the `(None, Some(command))` arm's empty check at src/system/user_services.rs:131.
Common situations: Leaving a placeholder empty string in config; templating that expands to an empty value; clearing a command while keeping the entry.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- user service '{name}' cannot be masked; use `state = "absent
- user service '{name}': `on_change` only applies to system se
- user service '{name}' sets both `builtin` and `command`; cho
- user service '{name}' must set `command` or `builtin`
- user service '{name}' names unknown builtin '{builtin_name}'
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/1186100ffc6a96ad.
Report an issue: GitHub.